I have a QDateTime
which stores the time and the date in a fromat like this
>>> now = QtCore.QDateTime.currentDateTime()
>>> print(now)
>>> PyQt4.QtCore.QDateTime(2015, 8, 28, 17, 15, 33, 340)
And I have QDateTimeEdit
which stores the date in the same format as above.
What I'm trying to do is convert the difference between the two DateTimes in seconds.
So 28.8.2015 17:20 (DD.M.YYYY HH:SS) and 28.8.2015 17:25 would be difference 5 minutes and that's 300 (seconds).
Is there a simple and pythonic way of doing this?