## Time Specifications

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

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

### Syntax

<set_time_command> ::= SET TIME <standard_time_mask>

<time_spec> ::= TIME <standard_time_mask>
| TIME '<free_mask_time>'

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

SET TIME <standard_time_mask> | This setting of a standardized time mask applies to the entire Loader session provided that the time mask is not changed by another SET TIME command.
<time_spec> | You can change the current time mask for individual commands by using the syntax element time_spec to define the data format (field_format_spec).
TIME <standard_time_mask> | You use the standard_time_mask to specify the format for plain text values in which TIME columns are entered and displayed. Default value: INTERNAL
TIME '<free_mask_time>' | You use the freely definable time mask free_mask_time to specify the format for plain text values in which TIME columns are entered and displayed. Use H for hours, M for minutes, and S for seconds. Minutes and seconds must have two digits. Hours must have two or four digits.

### Examples

EXPORT COLUMNS * FROM hotel.reservation
OUTSTREAM 'reservation_csv.data'
TIME ISO

Standard time mask ISO is specified.

EXPORT COLUMNS * from hotel.reservation
OUTSTREAM 'reservation_csv.data'
TIME 'HH:MM:SS'

Example content of the data stream
"14:30:08"

Mask HH:MM:SS is specified for times.

### Standard Time Mask <standard_time_mask>

'HHHH' | Four-digit hour format
'HH' | Two-digit hour format
'MM' | Two-digit minute format (00-59)
'SS' | Two-digit second format (00-59)

Format | General Format | Example
EUR | 'HH.MM.SS' | '14.30.08'
INTERNAL | 'HHHHMMSS' | '00143008'
ISO/JIS | 'HH:MM:SS' | '14:30:08'
USA | 'HH:MM AM (PM)' | '2:30 PM'

Minutes and seconds must have two digits. Except in the format INTERNAL, the hours must have two digits. In the format INTERNAL, the hours must have two or four digits.

When data is imported, hours with numbers greater than 24 cause errors, except in the format INTERNAL. When data is exported, hours are displayed modulo 24, except in the format INTERNAL. In the format INTERNAL, you can specify hours up to 9999.

See also:

Date Specifications

Time Stamp Specifications