You use this syntax rule to specify the data format of the plain text values in which TIMESTAMP columns are entered and displayed. A timestamp consists of a date and time value and a microsecond specification.
This format only applies to the import or export command in which it is specified. If a time stamp format is not specified in a command, then either the Loader default is used or a value specified with the SET TIMESTAMP command. You use the SET TIMESTAMP command to specify the time stamp format for all subsequent commands. In a single Loader session, this applies until a new SET command is executed.
<set_timestamp_command> ::= SET TIMESTAMP <standard_timestamp_mask>
<timestamp_spec> ::=
TIMESTAMP <standard_timestamp_mask>
|
TIMESTAMP '<free_mask_timestamp>'
<standard_timestamp_mask> ::= EUR | INTERNAL | ISO | JIS | USA
SET TIMESTAMP <standard_timestamp_mask> |
This setting of a standardized time stamp mask applies to the entire Loader session provided that the time stamp mask is not changed by another SET TIMESTAMP command. |
<timestamp_spec> |
You can change the current time stamp mask for individual commands by using the syntax element timestamp_spec to define the data format (field_format_spec). |
TIMESTAMP <standard_timestamp_mask> |
You use the standard_timestamp_mask to specify the format for plain text values in which TIMESTAMP columns are entered and displayed. Default value: INTERNAL |
TIMESTAMP '<free_mask_timestamp>' |
You use the freely definable time stamp mask free_mask_timestamp to specify the format for plain text values in which TIMESTAMP columns are entered and displayed. Use Y for the year, M for the month, D for the day, H for the hours, M for the minutes, S for the seconds, and N for the microseconds. 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. Minutes and seconds must have two digits. Hours must have two or four digits. For microseconds, you can choose any number of digits from 0 to 6. |
EXPORT COLUMNS * FROM hotel.reservation
OUTSTREAM ′reservation_csv.data′
TIMESTAMP ISO
Standard time stamp mask ISO is specified.
EXPORT COLUMNS * FROM hotel.reservation
OUTSTREAM ′reservation_csv.data′
TIMESTAMP ′YYYY-MM-DD-HH-MM-SS-NNNNNN′
Example of the content of the data stream: "2005-11-15-13-14-12-987654"
Mask YYYY-MM-DD-HH-MM-SS-NNNNNN is specified for time stamp information.
'YYYY' |
Four-digit year format |
'MM' |
Two-digit month format (01-12) |
'DD' |
Two-digit day format (01-31) |
'HH' |
Two-digit hour format (0-24) |
'MM' |
Two-digit minute format (00-59) |
'SS' |
Two-digit second format (00-59) |
'NNNNNN' |
Six-digit microsecond format |
Format |
General Format |
Example |
EUR/JIS/USA |
'YYYY-MM-DD-HH.MM.SS.NNNNNN' |
'2005-01-23-14.30.08.456234' |
INTERNAL |
'YYYYMMDDHHMMSSNNNNNN' |
'20050123143008456234' |
ISO |
'YYYY-MM-DD HH:MM:SS.NNNNNN' |
'2005-01-23 14:30:08.456234' |
Years must have four digits. Months and days must have two digits.
Hours, minutes, and seconds must have two digits.
For microseconds, you can choose any number of digits from 0 to 6.
See also: