Subject | Re: Date in SQL |
---|---|
Author | Aage Johansen |
Post date | 2003-05-19T21:27:01Z |
On Mon, 19 May 2003 19:25:00 +0000 (UTC), Andrew Neillans
<andy@...> wrote:
Pull out the 3 parts of the date, and combine them into an accepted format
(among others):
yyyy-mm-dd
dd.mm.yyyy
mm/dd/yyyy
--
Aage J.
<andy@...> wrote:
>> Poor Andrew, and dozen of vampires under the quilt to author ofYou can use _substring_ (UDF, or function - don't remember for Fb/1.0).
>> this database ;) Perhaps
>> WHERE Cast("contact"."registered" as Date) < '01/01/2003'
>> will help, but I'm afraid there are rows in both formats
>> '13/01/02' (mm/dd/yy format)
>> '01.13.02' (dd.mm.yy format)
>
> Hehe - unfortunatly the guy who designed / implemented this app is away
> on holiday (lucky timing do you wonder??).
>
> Browsing though the records, all the dates are in the same format, UK -
> dd/mm/yyy.
> Using Cast gives an SQL error: conversion error from string "17/04/2003"
> SO I assume it is trying to convert from the US format - mm/dd/yyyy - is
> there any way to change this format?
Pull out the 3 parts of the date, and combine them into an accepted format
(among others):
yyyy-mm-dd
dd.mm.yyyy
mm/dd/yyyy
--
Aage J.