pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gary Stainburn <gary.stainburn@ringways.co.uk>
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Fixing faulty dates - select on day part of a date field
Date: Fri, 30 Nov 2001 09:19:28 +0000
Message-ID: <E169jml-0003hA-00@stan.ringways.co.uk> (raw)
In-Reply-To: <GNELIHDDFBOCMGBFGEFOEEKBCAAA.chriskl@familyhealth.com.au>
References: <GNELIHDDFBOCMGBFGEFOEEKBCAAA.chriskl@familyhealth.com.au>

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     



view thread (7+ messages)

Message-ID: <E169jml-0003hA-00@stan.ringways.co.uk>
Permalink:  ../E169jml-0003hA-00@stan.ringways.co.uk/
Also on:    postgresql.org/message-id/E169jml-0003hA-00@stan.ringways.co.uk

 · 

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: gary.stainburn@ringways.co.uk, chriskl@familyhealth.com.au
  Subject: Re: Fixing faulty dates - select on day part of a date field
  In-Reply-To: <E169jml-0003hA-00@stan.ringways.co.uk>

* 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