Skip site navigation (1) Skip section navigation (2)

Re: Date Format Question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Frank Bax <fbax(at)sympatico(dot)ca>
Cc: pgsqlnovice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Date Format Question
Date: 2005-12-05 19:42:27
Message-ID: 1832.1133811747@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
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).

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Frank BaxDate: 2005-12-05 19:56:53
Subject: Re: Date Format Question
Previous:From: Frank BaxDate: 2005-12-05 19:11:46
Subject: Re: Date Format Question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group