On Thu, 30 Apr 1998, The Hermit Hacker wrote:
> On Thu, 30 Apr 1998, Jose' Soares Da Silva wrote:
>
> > On 30 Apr 1998, Tom Ivar Helbekkmo wrote:
> >
> > > "Jose' Soares Da Silva" <sferac@bo.nettuno.it> writes:
> > >
> > > > I vote for changing default date format to ISO-8601 to reflect
> > > > PostgreSQL documentation and for adherence to Standard SQL92.
> > >
> > > Hear! Hear! Good standards beat silly conventions any day!
> > >
> > Seems that you don't like conventions Tom, but you want
> > that all world use dates with American format.
> > Seems that you want impose one convention.
>
> Can someone inform me of what ISO-8601 exactly is?
>
- ISO 8601:1988, Data elements and interchange formats - Information
interchange-Representation of dates and times.
3.1.2 Definitions taken from ISO 8601
This International Standard makes use of the following terms
defined in ISO 8601:
a) Coordinated Universal Time (UTC)
b) date ("date, calendar" in ISO 8601)
See (Second Informal Review Draft) ISO/IEC 9075:1992,
Database Language SQL- July 30, 1992)
The required ISO 8601 syntax for DATE is:
DATE 'YYYY-MM-DD'
Comments:
1) DATE combines the datetime fields YEAR, MONTH and DAY.
2) DATE defines a set of correctly formed values that
represent any valid Gregorian calendar date between January 1, 1
AD and December 31, 9999 AD.
3) Any operation that attempts to make a DATE <data type>
contain a YEAR value that is less than 1 or greater than 9999
will fail; the DBMS will return the:
SQLSTATE error 22007 "data exception-invalid datetime format".
4) DATE expects dates to have the following form: yyyy-mm-dd
e.g.: 1994-07-15 represents July 15, 1994.
5) DATE has a length of 10.
6) Date literals must start with the <keyword> DATE and
include 'yyyy-mm-dd';
e.g.:
CREATE mytable (mydate DATE);
INSERT INTO mytable (mydate) VALUES (DATE '1996-01-01');
Jose'