MT Conversion

Time Format. The MT conversion converts time to internal format and, on output, to 12-hour or 24-hour format. If no options are specified, time is represented in 24-hour format (hh : mm).

Format

MT [H] [S]

Parameter(s)

H

Specifies 12-hour format with AM or PM appended.

S

Specifies that seconds are to be included.

Description

Data representing time is usually stored internally as the number of seconds after midnight.

NOTE

The MT conversion can give unusual results on numbers greater than 86399, since only those numbers in the range from 0 (12:00 PM) through 86399 (11:59 PM) are valid for time conversions.

Using the MT Conversion

In the examples listed in the table below, the first column shows the value the user inputs, the second column shows the MT Conversion applied, the third column shows the converted value as stored, and the fourth column shows the converted value as it is output.

Input Value

MT Conv

Stored Value

Output

11

MT

39600

11:00

11

MTH

39600

11:00AM

11

MTS

39600

11:00:00

11

MTHS

39600

11:00:00AM

11:15AM

MT

40500

11:15

11:15AM

MTH

40500

11:15AM

11:15PM

MT

40500

11:15

11:15PM

MTH

83700

11:15PM

1

MT

3600

01:00

1

MTH

3600

01:00AM

1PM

MT

3600

01:00

1PM

MTH

46800

01:00PM

13

MT

46800

13:00

13

MTH

46800

01:00PM

See Also

Correlatives and Conversions Reference