Article View: borland.public.vdbase.data.sql
Article #165Re: Date field in sql builder
From: Romain Strieff [TeamB]
Date: Sat, 06 Mar 1999 00:00
Date: Sat, 06 Mar 1999 00:00
45 lines
2275 bytes
2275 bytes
In article <36e74b65.17766972@forums.inprise.com>, Steve Koterski politely paraphrased ... > > >But only if you use the slash as separator, if you use the dot, it works. > >It seems to think it's US dates only when it sees the "/" > > Holy sheep doo-doo, Batman! --- We are not going to start a sheep-thread, aren't we? <G> > You are correct and I have empirically > confirmed this behavior (which satisfies my penchant for cynical doubt -- > no offense intended). --- I have a 'penchant' for the same vice,;-) so I forgive you. > With a Windows setting for Short Date Style of dd.MM.yyyy and a Date > Separator setting of a period (.), local SQL will indeed accept DATE and > TIMESTAMP literals where the date is in this format. > > SELECT OrderNo, SaleDate, EXTRACT(MONTH FROM SaleDate) AS MM > FROM "Orders.db" > WHERE (SaleDate BETWEEN "01.01.1998" AND "31.05.1998") > > However, with a Windows setting for Short Date Style of dd-MM-yyyy and a > Date Separator setting of a period (-), the same dates no longer work. > > SELECT OrderNo, SaleDate, EXTRACT(MONTH FROM SaleDate) AS MM > FROM "Orders.db" > WHERE (SaleDate BETWEEN "01-01-1988" AND "31-05-1988") > > This would appear to be a short-coming in how the SQL parser used by the > 32-bit BDE works with these literal values in conjunction with Windows > system settings. -- It doesn't like mixes.<G> > I will correct the related information in the local SQL online help file > forthwith! Thanks. -- Romain Strieff [TeamB] Please read this newsgroup guide below before posting on the private Inprise newsgroups. http://www.inprise.com/newsgroups/guide.html --
Technical Details
Message-ID:
<MPG.114b34444be0e516989fd8@forums.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7bk1bs$2i77@forums.borland.com> <36ddce30.1329713@forums.borland.com> <36e4e115.7047839@forums.inprise.com> <MPG.114868a19e128ae3989fa1@forums.inprise.com> <36e74b65.17766972@forums.inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,9c0ce2ccf9b5c6e5 X-Google-Attributes: gidff5a1,public From: teamb@opto-pps.com (Romain Strieff [TeamB]) Subject: Re: Date field in sql builder Date: 1999/03/06 Message-ID: <MPG.114b34444be0e516989fd8@forums.inprise.com> X-Deja-AN: 451872415 References: <7bk1bs$2i77@forums.borland.com> <36ddce30.1329713@forums.borland.com> <36e4e115.7047839@forums.inprise.com> <MPG.114868a19e128ae3989fa1@forums.inprise.com> <36e74b65.17766972@forums.inprise.com> Organization: TeamB Newsgroups: borland.public.vdbase.data.sql