NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
D-8
DATE_FORMAT Option
DATE_FORMAT Option
DATE_FORMAT is an option of the SQLCI report writer SET STYLE command that
specifies a default format for dates.
date-format
is a string that defines a new default format for print items specified with AS DATE
*. It must contain a valid numeric format as described in AS DATE/TIME.
The default format is M2/D2/Y2.
Examples—DATE_FORMAT
The following example sets a new default date format:
>> SET STYLE DATE_FORMAT "MA DB2, Y4";
An example of a date in this format follows:
December 25, 1994.
DATE-TIME Data Types
An item of a date-time data type represents a point in time. It can include a date, a time,
or a date and time. There are four date-time data types:
DATETIME
DATE
TIME
TIMESTAMP
The term “date-time data type” refers to all four of these data types. The term
“DATETIME data type” refers only to the first of these data types.
The DATETIME data type has a range of logically contiguous fields in this order:
YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, and FRACTION. A specific
DATETIME data type has a subset or range of these fields, and a specified number of
significant digits for the FRACTION field. For example:
DATETIME YEAR TO MONTH
DATETIME DAY TO FRACTION(3)
DATE_FORMAT "date-format"