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 8601

5

yyyy-Www-d

ISO 8601

6

yyyy-ddd

ISO 8601

 

Field Order

 

For codes 1...6 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 codes 4, 5, and 6. 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

 

Codes 4, 5, and 6 (ISO 8601) uses a hyphen as the separator character. For the other formats, the default Windows date separator is returned.