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. How to create timestamp

How to create timestamp

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
2 Posts 2 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.
  • P Offline
    P Offline
    pl_kode
    wrote on last edited by
    #1

    Please let me know how do I create a timestamp. In the following format.. 2007.11.21 16:36:46.094+00:00 Thanks

    J 1 Reply Last reply
    0
    • P pl_kode

      Please let me know how do I create a timestamp. In the following format.. 2007.11.21 16:36:46.094+00:00 Thanks

      J Offline
      J Offline
      Jijo Raj
      wrote on last edited by
      #2

      Get the system time by calling GetSystemTime(). The SYSTEMTIME struct contains everything you need to generate this timestamp. Use CString::Format() to format to your required format.

      pl_kode wrote:

      2007.11.21 16:36:46.094**+00:00**

      BTW this time is in UMT? :confused: For converting your local time to UMT, Get the current timezone by calling GetTimeZoneInformation() then convert it to UMT by calling TzSpecificLocalTimeToSystemTime() Regards, Jijo.

      _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

      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