Date Format Models
The date format models can be used in the following conditions:
• TO_CHAR function: For translate a DATE value this is in a format other than the default date format
• TO_DATE function: For translate a character value this is in a format other than the default date format.
Date Format Elements
A date format model is composed of one or more date format parts. NO TAG lists the date format model elements.
Element Meaning
SCC or CC Century; "S" prefixes BC dates with "-"
YYYY or SYYYY 4-digit year; "S" prefixes BC dates with "-"
IYYY on the ISO standard4-digit year based
YYY or YY or Y Last 3, 2, or 1 digit(s) of year
IYY or IY or I Last 3, 2, or 1 digit(s) of ISO year
Y, YYY Year with comma in this position
SYEAR or YEAR Year, spelled out; "S" prefixes BC dates with "-"
RR for years in other countries; Last 2 digits of year
BC or AD BC/AD indicator
B.C. or A.D. BC/AD indicator with periods
Q Quarter of year (1, 2, 3, 4; JAN-MAR = 1)
MM Month (01-12; JAN = 01)
RM Roman numeral month (I-XII; JAN = I).
MONTH Name of month that padded with blanks to length of 9 characters
MON Abbreviated name of month.
WW Week of year (1-53) where week 1 begins on the first day of the year and continues to the seventh day of the year
IW Week of year (1-52 or 1-53) which is based on the ISO standard
W Week of month (1-5) where week 1 begins on the first day of the month and ends on the seventh
DDD Day of year (1-366)
DD Day of month (1-31)
D Day of week (1-7)
DAY Name of day and padded with blanks to length of 9 characters
DY Abbreviated name of day
AM or PM Meridian indicator
A.M. or P.M. Meridian indicator with periods
HH or HH12 Hour of day (1-12)
HH24 Hour of day (0-23)
MI Minute (0-59)
SS Second (0-59)
SSSSS Seconds past midnight (0-86399).