pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jason.servetar@ccgenesis.com
Cc: pgsql-sql@postgresql.org
Subject: Re: to_date/to timestamp going to BC
Date: Wed, 03 Oct 2001 17:14:02 -0400
Message-ID: <11453.1002143642@sss.pgh.pa.us> (raw)
In-Reply-To: <309339290B4FD31184BC0060B06888CB01D0FDF2@CADILLAC>
References: <309339290B4FD31184BC0060B06888CB01D0FDF2@CADILLAC>

jason.servetar@ccgenesis.com writes:
> Can someone tell me if this is a bug with the date functions or am I using
> them incorrectly?

I get the right thing when I use the right format:

regression=# select dt, to_timestamp(dt, 'FMMonth dd, yyyy') from test_date;
       dt       |      to_timestamp
----------------+------------------------
 March 11, 1997 | 1997-03-11 00:00:00-05
(1 row)

However, I'd agree that this shows a lack of robustness in to_timestamp;
it's not objecting to data that doesn't match the format.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <11453.1002143642@sss.pgh.pa.us>
Permalink:  ../11453.1002143642@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11453.1002143642@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, jason.servetar@ccgenesis.com
  Subject: Re: to_date/to timestamp going to BC
  In-Reply-To: <11453.1002143642@sss.pgh.pa.us>

* 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