Time Conversion (MT)

Top  Previous  Next

 

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

 

Hspecifies 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.

 

Sspecifies that output conversion is to include the seconds field. Input conversion determines whether seconds are included by examination of the data to be converted.

 

cis 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).

 

 

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