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

date format

From: iuri de araujo sampaio <iuri(dot)sampaio(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: date format
Date: 2008-01-24 08:06:58
Message-ID: 1201162018.7883.12.camel@COMPAQ (view raw, whole thread or download thread mbox)
Lists: pgsql-sql

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}"

I am concerned the input syntax for type date is YYYY-MM-DD. 
as default, postgresql is set to accept the format DD-MM-YYYY for type

so far, i am not able to change the input format and so I need to change
the postgresql type date dafault format. 



pgsql-sql by date

Next:From: A. KretschmerDate: 2008-01-24 08:21:02
Subject: Re: date format
Previous:From: Andreas Joseph KroghDate: 2008-01-23 10:25:44
Subject: ALTER TABLE <mytable> DROP CONSTRAINT IF EXISTS <myconstraint> ?

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