How to create timestamp
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Please let me know how do I create a timestamp. In the following format.. 2007.11.21 16:36:46.094+00:00 Thanks
Get the system time by calling
GetSystemTime()
. TheSYSTEMTIME
struct contains everything you need to generate this timestamp. UseCString::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 callingTzSpecificLocalTimeToSystemTime()
Regards, Jijo._____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.