I take date from QDateTimeEdit and convert it to seconds like this:
QDateTimeEdit
import time from datetime import datetime date = self.__ui.dateTimeEdit.date().
The QDate you get from
QDate
self.__ui.dateTimeEdit.date()
has another method toPyDate that will save you the round trip through a string.