Time formats
- Last Updated: December 12, 2014
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
A time format string can contain any of the following format keywords along with other characters. The format keywords in the format string are replaced by corresponding values to get the result. The other characters are displayed as literals.
The following table lists the time formats and their corresponding descriptions.
| Time format | Description |
|---|---|
AM
PM
|
The string AM or PM depending
on whether time corresponds to morning or afternoon |
A.M.
P.M.
|
The string A.M. or P.M. depending
on whether time corresponds to morning or afternoon |
HH12
|
The hour value as a two‑digit number (in the
range 00 to 11) |
HH
HH24
|
The hour value as a two‑digit number (in the
range 00 to 23) |
MI
|
The minute value as a two‑digit number (in
the range 00 to 59) |
SS
|
The seconds value as a two‑digit number (in
the range 00 to 59) |
SSSSS
|
The seconds from midnight as a five‑digit number
(in the range 00000 to 86399) |
MLS
|
The milliseconds value as a three‑digit number
(in the range 000 to 999) |
Example
The
following example illustrates the TO_CHAR function,
and the Day, Month, dd,
and HH12 format strings:
|