On Thu, 19 Aug 1999 21:09:46 +0200, "Jaap Stegenga" <jhstege...@tip.nl>
wrote:
Quote
>The BDE accepts and generates dates according to int'l settings, for example
>"31-12-99". However Local SQL does not recognize these settings and only
>accepts "M/D/Y" format despite other Windows- and BDE administrator
>settings. Questions:
>1. Can I instruct Local SQL to accept other date formats?
>2. If not, does Local SQL always and only apply the "M/D/Y" format?
From the local SQL online help file, LOCALSQL.HLP, found in the main BDE
directory...
There are two acceptable formats for the date parts of DATE and TIMESTAMP
literals in local SQL statements: the US date format and the European date
format. Which one of the two you use is predicated on the Windows
configuration settings for Date Separator and Short Date Style. If the Date
Separator is a slash (/) and Short Date Style puts the month before the day
(such as MM-dd-yy), the date must be in a US date format, MM/DD/YY or
MM/DD/YYYY. If the Date Separator is a period (.) and Short Date Style puts
the day before the month (such as dd.MM.yy), the date must be in a European
date format, DD.MM.YY or DD.MM.YYYY. A combination of Short Date Style of
month before day and a Date Separator of anything but a period is not
supported in local SQL. DATE and TIMESTAMP values passed to an SQL
statement via parameters and the values in columns are unaffected by these
restrictions on format. Only literal values are affected.
To prevent date literals from being mistaken by the SQL parser for
arithmetic calculations, enclose them in quotation marks. This keeps
1/23/1998 from being mistaken for 1 divided by 23 divided by 1998.
Example of a date literal in a US format:
SELECT *
FROM orders
WHERE (saledate <= "1/23/1998")
Example of the same date literal in a European format:
SELECT *
FROM orders
WHERE (saledate <= "23.1.1998")
Leading zeros for the month and day fields are optional.
If the century is not specified for the year in a date value, the BDE
settings FOURDIGITYEAR and YEARBIASED control the century of the date.
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Steve Koterski "You may already be a loser."
Felton, CA -- Form letter received by
Rodney Dangerfield