|
The time conversion code converts a time from its internal representation (number of seconds since midnight) to a string representing hours, minutes and seconds or vice versa.
The full format of this conversion code is
MT {H} {S} {c}
where
| H | specifies that the time is to appear in 12-hour format with either "am" or "pm" appended. If H is not specified, 24-hour conversion is used for output conversion and assumed for input conversion. If the AMPM.UPCASE mode of the OPTION command is active, the appended suffix is in uppercase (AM or PM). |
| S | specifies that output conversion is to include the seconds field. Input conversion determines whether seconds are included by examination of the data to be converted. |
| c | is the character to separate the hours, minutes and seconds fields. If omitted, a colon is used. The separator character should be enclosed in quotes if required to avoid syntactic ambiguity (for example MT'h' for French format times such as 09h30). A pair of adjacent quotes can be used to specify that no separator is to be inserted. |
Examples
Conversion
|
Data
|
Result
|
MT
|
0
|
00:00
|
MT
|
31653
|
08:47
|
MT
|
63306
|
17:35
|
MTH
|
0
|
12:00am
|
MTH
|
31653
|
08:47am
|
MTH
|
63306
|
05:35pm
|
MTS
|
31653
|
08:47:33
|
MTS
|
63306
|
17:35:06
|
MTHS
|
63306
|
05:35:06pm
|
MTS.
|
63306
|
17:35:06
|
MT'h'
|
63306
|
17h35
|
MT''
|
63306
|
1735
|
See also:
Dates, Times and Epoch Values
|