Background documentationTime Specifications Locate this document in the navigation structure

 

You use this syntax rule to specify the data format of the plain text values in which TIME columns are input and output. This format only applies to the import or export Loader command in which it is specified. If a time format is not specified in a command, either the Loader default or a value specified with the SET TIME command is used. 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.

Structure

Syntax Syntax

  1. <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
End of the code.
<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' 'HH:MM PM'

'2:30 PM'

Minutes and seconds must have two digits. Hours must have two digits except in format INTERNAL. In format INTERNAL, the hours may have either two or four digits. When data is imported, hours greater than 24 cause errors, except in format INTERNAL. When data is exported, hours are displayed modulo 24, except in format INTERNAL. In format INTERNAL, you can specify hours up to 9999.

<set_time_command>

This setting of a standardized time mask using SET TIME command 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 input and output (default value: INTERNAL).

TIME '<free_mask_time>'

You use any 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.

Example

Example Example

EXPORT COLUMNS * FROM hotel.reservation

DATA OUTSTREAM 'reservation_csv.data'

  TIME ISO

End of the example.

Standard time mask ISO is specified.

Example Example

EXPORT COLUMNS * FROM hotel.reservation

DATA OUTSTREAM 'reservation_csv.data'

  TIME 'HH:MM:SS'

Example of the content of the data stream:

"14:30:08"

End of the example.

Free mask HH:MM:SS is specified for times.