Skip site navigation (1) Skip section navigation (2)

Re: date format

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: (view raw, whole thread or download thread mbox)
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');
select * from test;
(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.

In response to

pgsql-sql by date

Next:From: Andrej Ricnik-BayDate: 2008-01-25 03:32:51
Subject: Extract interdependent info from one table
Previous:From: Scott MarloweDate: 2008-01-24 15:44:01
Subject: Re: ALTER TABLE <mytable> DROP CONSTRAINT IF EXISTS <myconstraint> ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group