I want to create a date-time picker control that shows both date and time, as a combination of the DTS_SHORTDATECENTURYFORMAT
and DTS_TIMEFORMAT
styles. Since there is no such style built into the date-time picker, I have to do it myself with GetLocaleInfoEx()
.
I notice that by default, GetLocaleInfoEx(LOCALE_SSHORTDATE)
seems to return a four-digit year, which is what I want. Is this reliable? It's not documented anywhere, only that there can be more than one string for LOCALE_SSHORTDATE
. If I have to enumerate the possible strings, how would I know which one is the one I want? Do I just look for the first string to contain yyyy
? That doesn't sound reliable to me, at least not on its own...
Thanks.