Date/Time conversions
- Posted by cp Mar 25, 2012
- 1318 views
I have a database of transactions that have a date/time stamp formatted as a text string "YYYYMMDDHHMMSS" that is in GMT time. I need to convert these to local time. I've been looking at the Win32 function BOOL WINAPI SystemTimeToTzSpecificLocalTime( in_opt LPTIME_ZONE_INFORMATION lpTimeZone, in LPSYSTEMTIME lpUniversalTime, out LPSYSTEMTIME lpLocalTime)
as a way to do this work. However the structures lpUniversalTime & lpLocalTime use 16bit (word) values. I'm not sure how to populate the allocated memory structures in order to use them. Any help is appreciated. Of course if there is a better/easier way to do this I'm all ears. Thanks