SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
D-8
DATE Data Type
DATE Data Type
An item with data type DATE represents a date according to the Gregorian calendar.
Values of data type DATE are equivalent to values of data type DATETIME declared
as:
DATETIME YEAR TO DAY.
For information, see DATETIME Data Type on page D-15.
Example—DATE Data Type
These examples are literals of data type DATE in (respectively) default, USA, and
European format:
DATE "2004-01-22"
DATE "01/22/2004"
DATE "22.01.2004"
For information, see Date-Time Literals on page D-10.
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.
Example—DATE_FORMAT
This 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, 2004.
DATE_FORMAT "date-format"