|
-
Oct 25th, 1999, 07:15 PM
#2
Addicted Member
When you specify the criteria argument, date literals must be in U.S. format, even if you're not using the U.S. version of the Microsoft Jet database engine. For example, May 10, 1996, is written 10/5/96 in the United Kingdom and 5/10/96 in the United States. Be sure to enclose your date literals with the number sign (#) as shown in the following examples.
To find records dated May 10, 1996 in a United Kingdom database, you must use the following SQL statement:
SELECT *
FROM Orders
WHERE ShippedDate = #5/10/96#;
You can also use the DateValue function which is aware of the international settings established by Microsoft Windows. For example, use this code for the United States:
SELECT *
FROM Orders
WHERE ShippedDate = DateValue('5/10/96');
And use this code for the United Kingdom:
SELECT *
FROM Orders
WHERE ShippedDate = DateValue('10/5/96');
------------------
smalig
[email protected]
smalig.tripod.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|