You use this syntax rule to specify the data format of the plain text values in which TIMESTAMP columns are input and output. A time stamp consists of a date and time value and microseconds. This format only applies to the export or import Loader command in which it is specified. If a time stamp format is not specified in a command, either the Loader default or a value specified with the SET TIMESTAMP command is used. You use the SET TIMESTAMP command to specify the time format for all subsequent commands. In a Loader session, this applies until a new SET command is executed.
Syntax
<set_timestamp_command> ::= SET TIME <standard_timestamp_mask> <timestamp_spec> ::= TIME <standard_timestamp_mask> | TIME '<free_mask_timestamp>' <standard_timestamp_mask> ::= EUR | INTERNAL | ISO | JIS | USA
'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' |
'2008-01-23-14.30.08.456234' |
INTERNAL |
'YYYYMMDDHHMMSSNNNNNN' |
'20080123143008456234' |
ISO |
'YYYY-MM-DD HH:MM:SS.NNNNNN' |
'2008-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. Microseconds can have any number of digits from 0 to 6.
This setting of a standardized timestamp mask using the SET TIMESTAMP command applies to the entire Loader session as long as the time mask is not changed by another SET TIMESTAMP command.
You can change the current timestamp mask for individual commands by using the syntax element timestamp_spec to define the data format (field_format_spec).
You use the standard_timestamp_mask to specify the format for plain text values in which TIMESTAMP columns are input and output (default value: INTERNAL).
You use any timestamp mask free_mask_timestamp to specify the format for plain text values in which TIMESTAMP columns are input and output.
Example
EXPORT COLUMNS * FROM hotel.reservation
DATA OUTSTREAM 'reservation_csv.data'
TIMESTAMP ISO
Standard time stamp mask ISO is specified.
Example
EXPORT COLUMNS * FROM hotel.reservation
DATA OUTSTREAM 'reservation_csv.data'
TIMESTAMP 'YYYY-MM-DD-HH-MM-SS-NNNNNN'
Example of the content of the data stream:
"2008-11-15-13-14-12-987654"
Free mask YYYY-MM-DD-HH-MM-SS-NNNNNN is specified for time stamp information.