Try OpenEdge Now
skip to main content
ABL Data Types Addenda
DATETIME and DATETIME-TZ data types : Display formats
 

Display formats

The format policy syntax for DATETIME and DATETIME-TZ is similar to the DATE and TIME formats:

Syntax

any-date-format   time-with-timezone-format
You can leave off part or all of the time format. The date part is subject to the usual –d or SESSION:DATE-FORMAT rules.
The default format for DATETIME is:
"99/99/9999 HH:MM:SS.SSS".
The default format for DATETIME-TZ is:
"99/99/9999 HH:MM:SS.SSS+HH:MM"
Valid time formats are:
*"HH"
*"HH:MM"
*"HH:MM:SS"
*"HH:MM:SS.SSS"
*"HH:MM:SS.SSS+HH:MM"
*"HH:MM:SS.SSS AM"
*"HH:MM:SS.SSS AM+HH:MM"
The HH:MM after the plus (+) sign represents time zone offset from UTC. The AVM displays a plus sign (+) when the time zone offset is positive, and a minus sign (-) when it is negative.
The fractional part of seconds is optional (SS, SS.S, SS.SS and SS.SSS are all allowed).
If the time format contains an "A" or "a", instead of displaying the time in 24 hour format, the AVM displays the time in 12 hour format (Hour 0 is 12 am and Hour 12 is 12 pm).
* Displaying DATETIME data based on display format
* Displaying DATETIME-TZ data based on display format