Neoview SQL Reference Manual (R2.4 SP2)

FORMAT Clause
“Considerations for Date Formats”
“Considerations for Other Formats”
“Examples of FORMAT”
The FORMAT clause specifies the output format for DATE values. It can also be used to specify
the length of character output or to specify separating the digits of integer output with colons.
Date Formats:
(FORMAT 'format-string') |
(DATE, FORMAT 'format-string')
format-string for Date Formats is:
YYYY-MM-DD
MM/DD/YYYY
YY/MM/DD
YYYY/MM/DD
YYYYMMDD
DD.MM.YYYY
DD-MM-YYYY
DD-MMM-YYYY
Other Formats:
(FORMAT 'format-string')
format-string for other formats is:
XXX
99:99:99:99
-99:99:99:99
YYYY-MM-DD
specifies that the FORMAT clause output format is year-month-day.
MM/DD/YYYY
specifies that the FORMAT clause output format is month/day/year
YY/MM/DD
specifies that the FORMAT clause output format is year/month/day.
YYYY/MM/DD
specifies that the FORMAT clause output format is year/month/day.
YYYYMMDD
specifies that the FORMAT clause output format is yearmonthday.
DD.MM.YYYY
specifies that the FORMAT clause output format is day.month.year.
DD-MM-YYYY
specifies that the FORMAT clause output format is day-month-year.
DD-MMM-YYYY
specifies that the FORMAT clause output format is day-month-year.
XXX
specifies that the FORMAT clause output format is a string format. The input must be a
numeric or string value.
99:99:99:99
specifies that the FORMAT clause output format is a timestamp. The input must be a numeric
value.
304 SQL Clauses