Re: Fixing faulty dates - select on day part of a date field - Mailing list pgsql-sql

From Gary Stainburn
Subject Re: Fixing faulty dates - select on day part of a date field
Date
Msg-id E169jml-0003hA-00@stan.ringways.co.uk
Whole thread Raw
In response to Re: Fixing faulty dates - select on day part of a date field  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-sql
Hi Chris,

I do now, hence the explicit date check of 2001/11/08 which is when I fixed 
the script.  BTW, it doesn't seem to matter whether I use '/' or '-'.

Gary

On Friday 30 November 2001 1:34 am, Christopher Kings-Lynne wrote:
> > update calls set date_part('day',xdate) =
> > date_part('month',xdate),
> >        date_part('month',xdate) = date_part('day',xdate)
> >        where date_part('day',xdate) < 13 and xdate < '2001/11/08';
> >
> > (2001/11/08 is when I found/fixed the insert problem)
>
> You should always use the ISO date format - it avoids all these problems,
> and is unambiguous.  It is: YYYY-MM-DD
>
> Chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

-- 
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     


pgsql-sql by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: contracting tables
Next
From: Stephan Szabo
Date:
Subject: Re: PL/pgSQL loops?