Date Display Formats |
|
All functions which return a date accept an optional code to specify the desired format of the date value:
Code |
Date Format |
Description |
0 or none |
see below |
system default |
1 |
mm/dd/yy |
USA |
2 |
dd/mm/yy |
European |
3 |
yy/mm/dd |
Japanese |
4 |
yyyy-mm-dd |
ISO 9601 |
Field Order
For codes 1...4 the field order is as shown above. For code 0 the field order will also be one of those shown above. TCC determines which field is reported first by Windows in a short date, and selects the order from the table above with the same first field. All other aspects of the Windows short date format are ignored,
Field Width
Month and day are always 2 digits. Year is 2 digits for codes 1, 2 and 3, and 4 digits for code 4. For code 0 the year is 4 digits if it is the first field returned, and 2 digits if it is the last one.
Field Separator
Code 4 (ISO 9601) uses a hyphen as the separator character. For the other formats, the default Windows date separator is returned.
Setting the Windows Date Formats
The details below apply to Windows XP, but other versions of Windows are similar.
Start è Settings è Control Panel è Regional and Language Options è Customize è Date display the desired menu. The two relevant fields are Short Date Format and Date Separator.