Win32: GetDateFormat and GetTimeFormat exist. GetDateTimeFormat?

Posted by Ian Boyd on Stack Overflow See other posts from Stack Overflow or by Ian Boyd
Published on 2010-03-12T18:23:10Z Indexed on 2010/03/12 18:27 UTC
Read the original article Hit count: 789

i know Win32 has the Nls function GetDateFormat, e.g.:

GetDateFormat(…, …, …, "dddd','MM','y", …, …);

and it has GetTimeFormat, e.g.:

GetTimeFormat(…, …, …, "tt ss':'hh':'mm", …, …);

But there a way to format both at once, e.g.:

GetDateTimeFormat(…, …, …, "tt dddd' - 'ss':'y';'hh':'mm MM", …, …);

Note: The format string is intentionally constructed to demonstrate that not all format strings are linearly seperable.

© Stack Overflow or respective owner

Related posts about win32

Related posts about internationalization