Re: Date Format Question - Mailing list pgsql-novice

From Frank Bax
Subject Re: Date Format Question
Date
Msg-id 5.2.1.1.0.20051205145402.00a34c80@pop6.sympatico.ca
Whole thread Raw
In response to Re: Date Format Question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
At 02:42 PM 12/5/05, Tom Lane wrote:

>Frank Bax <fbax@sympatico.ca> writes:
> > That's weird, because on my system to_date('31/12/2005','mm/dd/yyyy')
> > produces 2007-07-14!
>
>Yeah, to_date()'s lack of error checking is disgraceful.  For most
>purposes, it'd be better to read this data using the normal date
>input converter with DATESTYLE set to DMY (or MDY if that's what you
>really wanted).


I didn't mean the 2007-7-14 was weird result.  It was weird that OP's
results could not have come from the command he claimed to have
entered.  OP claimed that to_date('31/12/2005','mm/dd/yyyy') produced
12/31/2005; but that's not possible.


pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Date Format Question
Next
From: "Sugrue, Sean"
Date:
Subject: Re: Need help building SQL query