Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved How to use QDateTime to parse milli/microsecond

    General and Desktop
    3
    3
    738
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ttt123
      ttt123 last edited by

      This post is deleted!
      kshegunov 1 Reply Last reply Reply Quote 0
      • kshegunov
        kshegunov Moderators @ttt123 last edited by kshegunov

        @ttt123
        Hello,

        s / 1000000
        

        This is wrong, but you should think carefully why. Run it through the debugger and see what you get from that expression.

        PS.
        To give you a hint, think what the result of 12 / 10 would be.

        Read and abide by the Qt Code of Conduct

        1 Reply Last reply Reply Quote 0
        • Paul Colby
          Paul Colby last edited by

          Have a look at QDateTime::fromMSecsSinceEpoch

          Cheers.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post