## Dates

You use this syntax rule to specify the data format of the plain text values in which DATE columns are entered and output.

This format only applies to the import or export command in which it is specified. If no date format is specified in a command, either the Loader default is used, or a value specified with the SET DATE command. You use the SET DATE command to specify the date format for all subsequent commands. In a single Loader session, this applies until a new SET command is executed.

### Syntax

<set_date_command> ::= SET DATE <standard_date_mask>

<date_spec> ::= DATE <standard_date_mask>
| DATE '<free_mask_date>'

<standard_date_mask> ::= EUR | INTERNAL | ISO | JIS | USA

SET DATE <standard_date_mask> | This setting of a standardized date mask applies to the entire Loader session provided that the date mask is not changed by another SET DATE command.
<date_spec> | You can change the current date mask for individual commands by using the syntax element date_spec to define the data format (field_format_spec).
DATE <standard_date_mask> | You use the standard_date_mask to specify the format for plain text values in which DATE columns are entered and displayed. Default value: INTERNAL

DATE '<free_mask_date>'

You use the freely definable date mask free_mask_date to specify the format for plain text values in which DATE columns are entered and displayed.

Use Y for the year, M for the month, D for the day.
The year must have two or four characters, days must have two characters, and months must have two or three characters. If you enter three characters for the month, that is MMM, the name of the month is displayed as the standard English abbreviation, for example, Oct for October.

### Examples

EXPORT TABLE hotel.reservation
DATA OUTSTREAM 'reservation_csv.data'
DATE ISO

Standard date mask ISO is specified.

IMPORT TABLE hotel.reservation
DATA INSTREAM 'reservation_csv.data'
DATE 'YYYY-MMM-DD'

Example of the content of the data stream
"100","3000","80","single","2005-Nov-13","2005-Nov-15"

Mask YYYY-MMM-DD is specified for dates.

### Standard Date Mask <standard_date_mask>

'YYYY' | Four-digit year format
'MM' | Two-digit month format (01-12)
'DD' | Two-digit day format (01-31)

Format | General Format | Example
EUR | 'DD.MM.YYYY' | '23.01.2005'
INTERNAL | 'YYYYMMDD' | '20050123'
ISO/JIS | 'YYYY-MM-DD' | '2005-01-23'
USA | 'MM/DD/YYYY' | '01/23/2005'

Day and month entries must have two digits. In all formats except INTERNAL, the year must have two or four digits. In the INTERNAL format, the year must have four digits.

See also:

Time Specifications

Time Stamp Specifications