|
-
Oct 25th, 1999, 06:38 PM
#1
Thread Starter
Addicted Member
I am using an sql to select records from an Access file and need to know what format the database expects dates in - it seems to be mm/dd/yy is there any way i can change this to dd/mm/yy?? Because this is how it is entered via the DTPicker. Thanks
-
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
-
Oct 26th, 1999, 03:17 AM
#3
Frenzied Member
Don't know if it's an option bbut you can change the date format in the DTP control (dataformat property, I believe)
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
|