pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: iuri.sampaio@computer.org
Cc: SQL Postgresql List <pgsql-sql@postgresql.org>
Subject: Re: date format
Date: Thu, 24 Jan 2008 14:59:52 -0600
Message-ID: <dcc563d10801241259g4200d944mbddb0b9338c724ea@mail.gmail.com> (raw)
In-Reply-To: <1201195442.5996.4.camel@COMPAQ>
References: <1201162018.7883.12.camel@COMPAQ>
	<dcc563d10801240741k1e6f62a0lfb5490e018a8310a@mail.gmail.com>
	<1201195442.5996.4.camel@COMPAQ>

Please keep replies on list.  Others might have input that will help.

On Jan 24, 2008 11:24 AM, iuri de araujo sampaio <iuri.sampaio@gmail.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.



view thread (13+ messages)  latest in thread

Message-ID: <dcc563d10801241259g4200d944mbddb0b9338c724ea@mail.gmail.com>
Permalink:  ../dcc563d10801241259g4200d944mbddb0b9338c724ea@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10801241259g4200d944mbddb0b9338c724ea@mail.gmail.com

 · 

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: scott.marlowe@gmail.com, iuri.sampaio@computer.org
  Subject: Re: date format
  In-Reply-To: <dcc563d10801241259g4200d944mbddb0b9338c724ea@mail.gmail.com>

* 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