Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Display the date and time as a string.

Display the date and time as a string.

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 3 Posters 0 Views 1 Watching
  • 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.
  • V Offline
    V Offline
    vijay_aroli
    wrote on last edited by
    #1

    I have a DATE type variable and i am trying to display the date and time stored in it but i am not able to succeed. can anyone give me any suggestions? The date I am trying to display is in the form of FILETIME. Thanks in advance.

    Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

    F 1 Reply Last reply
    0
    • V vijay_aroli

      I have a DATE type variable and i am trying to display the date and time stored in it but i am not able to succeed. can anyone give me any suggestions? The date I am trying to display is in the form of FILETIME. Thanks in advance.

      Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

      F Offline
      F Offline
      fd0129002
      wrote on last edited by
      #2

      Try FileTimeToSystemTime function.

      V 1 Reply Last reply
      0
      • F fd0129002

        Try FileTimeToSystemTime function.

        V Offline
        V Offline
        vijay_aroli
        wrote on last edited by
        #3

        Thanks. i had the problem solved immediately after i posted the question here. :)

        fd0129002 wrote:

        Try FileTimeToSystemTime function.

        yes, I used the same function. Thanks anyways. :)

        Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

        N 1 Reply Last reply
        0
        • V vijay_aroli

          Thanks. i had the problem solved immediately after i posted the question here. :)

          fd0129002 wrote:

          Try FileTimeToSystemTime function.

          yes, I used the same function. Thanks anyways. :)

          Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

          N Offline
          N Offline
          Nelek
          wrote on last edited by
          #4

          hi, You can also use (in VC++, at least):

          CTime time = CTime::GetCurrentTime ();
          CString szEditTime = time.Format ( "%A, %d.%B.%Y, %H:%M:%S" );

          Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups