1

Possible Duplicate:
Is there a function like asctime_s() that works for SYSTEMTIME structures in windows?

I need to convert a type of SYSTEMTIME to a string. Then append the string product onto another string. Then finally convert the final string to type of LPCWSTR

All of the properties of the SYSTEMTIME are WORD types.

I think I need to convert the WORD types to wchar_t types and then concatenate them to get the string of SYSTEMTIME. How do I do this conversion and concatenation?

Once the final string has been built how can a LPCWSTR type be made from it?

Community
  • 1
  • 1
Duncan Gravill
  • 4,552
  • 7
  • 34
  • 51

1 Answers1

2

Use GetTimeFormatEx or GetTimeFormat if you need to support Windows XP to format a SYSTEM time to a string.

shf301
  • 31,086
  • 2
  • 52
  • 86
  • thanks shf301, this makes it much easier! I would like to have a complete date-time string, should I use `GetDateFormatEx` in conjunction or is there another function that does both? – Duncan Gravill Oct 30 '12 at 00:08