Re: Date Format Question

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: pgsqlnovice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Date Format Question
Date: 2005-12-05 19:56:53
Message-ID: 5.2.1.1.0.20051205145402.00a34c80@pop6.sympatico.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

At 02:42 PM 12/5/05, Tom Lane wrote:

>Frank Bax <fbax(at)sympatico(dot)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.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Obe, Regina DND\MIS 2005-12-05 21:30:53 How to see detailed plan of a funciton
Previous Message Tom Lane 2005-12-05 19:42:27 Re: Date Format Question