SQL/MX 3.1 Reference Manual (H06.23+, J06.12+)
SQL/MX Functions and Expressions
HP NonStop SQL/MX Release 3.1 Reference Manual—663850-001
9-182
TO_CHAR(<DATETIME>) Function
DY
dy
Dy
Returns the
abbreviated name of
the day in
uppercase,
lowercase, or
capitalized based on
case of the element.
31-MAR-11
05.02.31.123457 AM
‘DY’
‘dy’
‘Dy’
‘THU’
‘thu’
‘Thu’
FF[1..9] Returns fractional
seconds; the
numbers 1 through
9 can be used after
FF to specify the
number of digits in
fractional seconds.
The default value is
6.
31-MAR-11
05.02.31.123457 AM
‘FF’
‘FF2’
‘FF4’
‘123457’
‘12’
‘1234’
FM Fill-mode modifier is
used to remove
leading or trailing
blanks.
31-MAR-11
05.02.31.123457 AM
‘FMMONTH’ ‘MARCH’
HH
HH12
Returns the hour of
the day (1-12)
31-MAR-11
05.02.31.123457 AM
‘HH’ ‘05’
HH24 Returns the hour of
the day (0-23)
31-MAR-11
05.02.31.123457 AM
‘HH24’ ‘05’
IW Returns the week of
the year (1-52 or 1-
53) based on the
ISO standard.
31-MAR-11
05.02.31.123457 AM
‘IW’ ‘13’
IYYY
IYY
IY
I
Returns last 4, 3, 2
or 1 digits of the ISO
year.
31-MAR-11
05.02.31.123457 AM
‘IYYY’ ‘011’
YEAR
year
Year
SYEAR
Syear
SYear
Spell out year in
uppercase,
lowercase, or
capitalized based on
the case of the
element.
31-MAR-11
05.02.31.123457 AM
‘YEAR’
‘year’
‘Year’
‘TWENTY
ELEVEN
‘twenty
eleven’
‘Twenty
Eleven’
Element Description
datetime-
expression
format-
value Output










