Subject Re: [ib-support] Re: Date in SQL
Author Thomas Miller
The best date would be dd-mmm-yyyy. This works everywhere in the world.

Aage Johansen wrote:

>On Mon, 19 May 2003 19:25:00 +0000 (UTC), Andrew Neillans
><andy@...> wrote:
>
> >> Poor Andrew, and dozen of vampires under the quilt to author of
> >> 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?
>
>
>You can use _substring_ (UDF, or function - don't remember for Fb/1.0).
>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.
>
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>

--
Thomas Miller
Delphi Client/Server Certified Developer
BSS Accounting & Distribution Software
BSS Enterprise Accounting FrameWork

http://www.bss-software.com
http://sourceforge.net/projects/dbexpressplus