pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <aklaver@comcast.net>
To: pgsql-sql@postgresql.org
To: iuri.sampaio@computer.org
Subject: Re: date format
Date: Thu, 24 Jan 2008 07:37:09 -0800
Message-ID: <200801240737.10048.aklaver@comcast.net> (raw)
In-Reply-To: <1201162018.7883.12.camel@COMPAQ>
References: <1201162018.7883.12.camel@COMPAQ>

On Thursday 24 January 2008 12:06 am, iuri de araujo sampaio 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}" ")
> ##

If this : "2008 7 22 {} {} {} {DD MONTH YYYY}"  is indeed the string you are 
trying to input then it will not work. See-
http://www.postgresql.org/docs/8.2/interactive/datatype-datetime.html#DATATYPE-DATETIME-INPUT
for valid input types. 
>
> 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
> date.
>
> so far, i am not able to change the input format and so I need to change
> the postgresql type date dafault format.
>
> best,
> iuri
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match

-- 
Adrian Klaver
aklaver@comcast.net



view thread (13+ messages)  latest in thread

Message-ID: <200801240737.10048.aklaver@comcast.net>
Permalink:  ../200801240737.10048.aklaver@comcast.net/
Also on:    postgresql.org/message-id/200801240737.10048.aklaver@comcast.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: aklaver@comcast.net, iuri.sampaio@computer.org
  Subject: Re: date format
  In-Reply-To: <200801240737.10048.aklaver@comcast.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox