Re: date format - Mailing list pgsql-sql

From Scott Marlowe
Subject Re: date format
Date
Msg-id dcc563d10801241259g4200d944mbddb0b9338c724ea@mail.gmail.com
Whole thread Raw
In response to date format  (iuri de araujo sampaio <iuri.sampaio@gmail.com>)
List pgsql-sql
Please keep replies on list.  Others might have input that will help.

On Jan 24, 2008 11:24 AM, iuri de araujo sampaio <iuri.sampaio@gmail.com> wrote:
> Yes, I am trying to insert the string ´2008 7 22´ as a date.
> and i can´t change the input format. Is that a edit the default format
> type date, in order to postgresql accept thi
> s input?

Are you trying to insert '2008 7 22' or '2008 7 22 {} {} {} {DD MONTH
YYYY}' as a date?

If I try this:

create table test (dt date);
insert into test values ('2008 7 22');
INSERT 0 1
select * from test;    dt
------------2008-07-22
(1 row)

It works.

However, that other string is most certainly NOT a date.

Note I'm running pgsql 8.2.6 on ubuntu, just fyi.


pgsql-sql by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: ALTER TABLE DROP CONSTRAINT IF EXISTS ?
Next
From: "Andrej Ricnik-Bay"
Date:
Subject: Extract interdependent info from one table