PDA

View Full Version : currentMSecsSinceEpoch using specific DateTime



gab74
4th March 2014, 09:19
Good morning,
i see on QT Docs that :


qint64 QDateTime::currentMSecsSinceEpoch () [static]
Returns the number of milliseconds since 1970-01-01T00:00:00 Universal Coordinated Time

I want to know the milliseconds since 1970-01-01T00:00:00 Universal Coordinated Time for a specific Date Time.

How can i reach it ?

Thanks
Gabriele

anda_skoa
4th March 2014, 10:46
Create a QDateTime object for the epoch, use epoch.msecsTo(yourDate);

Cheers,
_