Previous Topic: DateNext Topic: Timestamp


Time

Time editing accepts many different specifiers. These specifiers indicate different portions of a formatted time value, such as the hours, minutes, seconds, and time zone name. These specifiers can be used in any combination, in any order, and intermixed with any literal characters in order to provide the necessary punctuation.

The following table lists all of the time specifiers.

Specifier

Description

HH or 24

Two-digit hour of the day, in 24-hour clock format. The value ranges from 00 to 23, or 24 when all other components are zero.

12

Two digit hour of the day, in a 12-hour clock format. This value ranges from 00 to 11, or 12 if all other components are zero.

MI or MM

Two-digit minutes of the hour. This value may range from 00 to 59. When the hour of the day is 24 (24-hour clock) or 12 (12-hour clock), then the minute value must be zero.

AM or PM

AM/PM indicator. If the internal time hour component is between 0 and 12, inclusive, then the string AM is shown. For a value of 13 to 24, PM is shown.

On input, if the value is AM, and the 12 component is between 0 and 12, then the internal hours and the value in the 12 component are the same.

If the indicator is PM, then 12 is added to the value of the 12 component to compute the 24-hour clock value to be stored internally.

The operation and behavior of the various time edit pattern specifiers is shown in the following table.

Internal Time (HHMMSS)

Edit Pattern

Presentation

012345

HH:MM:SS

01:23:45

134455

24:MI:SS

13:44:55

012345

12:MM PM

01:23 AM

134567

12:MM PM

01:45 PM