Results 1 to 2 of 2

Thread: currentMSecsSinceEpoch using specific DateTime

  1. #1
    Join Date
    Sep 2011
    Posts
    51
    Thanks
    2
    Qt products
    Qt4

    Default currentMSecsSinceEpoch using specific DateTime

    Good morning,
    i see on QT Docs that :

    Qt Code:
    1. qint64 QDateTime::currentMSecsSinceEpoch () [static]
    2. Returns the number of milliseconds since 1970-01-01T00:00:00 Universal Coordinated Time
    To copy to clipboard, switch view to plain text mode 

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: currentMSecsSinceEpoch using specific DateTime

    Create a QDateTime object for the epoch, use epoch.msecsTo(yourDate);

    Cheers,
    _

Similar Threads

  1. Generate a file with Datetime
    By StarRocks in forum Qt Programming
    Replies: 6
    Last Post: 19th January 2013, 21:55
  2. datetime field
    By valgaba in forum Qt Programming
    Replies: 5
    Last Post: 8th August 2012, 10:43
  3. QDateTime::currentMSecsSinceEpoch ()
    By fantom in forum Newbie
    Replies: 2
    Last Post: 15th May 2012, 23:18
  4. Replies: 5
    Last Post: 14th February 2011, 14:06
  5. How to get seconds diferences between two datetime
    By gustavedgardo in forum Newbie
    Replies: 1
    Last Post: 4th March 2009, 22:05

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.