Received: from stan.ringways.co.uk ([213.38.87.130]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fAU9L5m74006 for ; Fri, 30 Nov 2001 04:21:06 -0500 (EST) (envelope-from gary.stainburn@ringways.co.uk) Received: from gary.ringways.co.uk ([10.1.1.2] helo=there) by stan.ringways.co.uk with smtp (Exim 3.33 #2) id 169jml-0003hA-00; Fri, 30 Nov 2001 09:16:43 +0000 Content-Type: text/plain; charset="iso-8859-1" From: Gary Stainburn Organization: Ringways Garages Ltd To: "Christopher Kings-Lynne" Subject: Re: Fixing faulty dates - select on day part of a date field Date: Fri, 30 Nov 2001 09:19:28 +0000 X-Mailer: KMail [version 1.3.1] Cc: "pgsql-sql" References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: X-Archive-Number: 200111/432 X-Sequence-Number: 5814 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