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: pgsql-sql(at)postgresql(dot)org
Subject: Re: date format
Date: 2008-01-24 15:41:55
Message-ID: dcc563d10801240741k1e6f62a0lfb5490e018a8310a@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-sql
On Jan 24, 2008 2:06 AM, iuri de araujo sampaio <iuri(dot)sampaio(at)gmail(dot)com> wrote:
> hi,
>
> how to change the default format for type date?
> I have created a field on a table:
>
> ##
> create table tbl_inventory (
>         item_id integer constraint c_pk primary key,
>      I.         purchase_date date,
>     II.         fabrication_date date,
>    III.         expiration_date date
> );
> ##
>
> the error i got is:
>
> ##
> Database operation "dml" failed
> (exception ERROR, "ERROR:  invalid input syntax for type date: "2008 7 22 {} {} {} {DD MONTH YYYY}"
> ")
> ##

Can you give us a statement by statement example of what you're doing?
 Are you actually trying to insert the string '2008 7 22 {} {} {} {DD
MONTH YYYY}' as a date?

In response to

  • date format at 2008-01-24 08:06:58 from iuri de araujo sampaio

Responses

pgsql-sql by date

Next:From: Scott MarloweDate: 2008-01-24 15:44:01
Subject: Re: ALTER TABLE <mytable> DROP CONSTRAINT IF EXISTS <myconstraint> ?
Previous:From: Adrian KlaverDate: 2008-01-24 15:37:09
Subject: Re: date format

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