From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | iuri(dot)sampaio(at)computer(dot)org |
Cc: | "SQL Postgresql List" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: date format |
Date: | 2008-01-24 20:59:52 |
Message-ID: | dcc563d10801241259g4200d944mbddb0b9338c724ea@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)sampaio(at)gmail(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrej Ricnik-Bay | 2008-01-25 03:32:51 | Extract interdependent info from one table |
Previous Message | Scott Marlowe | 2008-01-24 15:44:01 | Re: ALTER TABLE <mytable> DROP CONSTRAINT IF EXISTS <myconstraint> ? |