If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Problem with date formats
Hi there,
I have a bug that I cannot trace. I use a short date format of d/m/yyyy. This is used throughout my database. However when I use dlookup through VBA, the query matched a date format of m/d/yyy. For example when I lookup a date of 12/09/1989 (12 Sept), the query matches it as a date of 09/12/1989( 09 Dec). I have gotten around the problem by chopping up the date and reconstructing it using some of the date funtions, but it seems to be a complicated way to solve what must be a simple bug. Any ideas. Thanks Kenny |
#2
|
|||
|
|||
Problem with date formats
Kenny wrote in message ...
Hi there, I have a bug that I cannot trace. I use a short date format of d/m/yyyy. This is used throughout my database. However when I use dlookup through VBA, the query matched a date format of m/d/yyy. For example when I lookup a date of 12/09/1989 (12 Sept), the query matches it as a date of 09/12/1989( 09 Dec). I have gotten around the problem by chopping up the date and reconstructing it using some of the date funtions, but it seems to be a complicated way to solve what must be a simple bug. In Access code and queries you have to use mm/dd/yyyy format or a format that uses alpha characters for the month. Just the way it is. |
#3
|
|||
|
|||
Problem with date formats
"Rick Brandt" wrote in message
... Kenny wrote in message ... Hi there, I have a bug that I cannot trace. I use a short date format of d/m/yyyy. This is used throughout my database. However when I use dlookup through VBA, the query matched a date format of m/d/yyy. For example when I lookup a date of 12/09/1989 (12 Sept), the query matches it as a date of 09/12/1989( 09 Dec). I have gotten around the problem by chopping up the date and reconstructing it using some of the date funtions, but it seems to be a complicated way to solve what must be a simple bug. In Access code and queries you have to use mm/dd/yyyy format or a format that uses alpha characters for the month. Just the way it is. Sorry to argue, Rick, but that's not 100% correct. You can use yyyy-mm-dd safely, since it's not ambiguous. (In fact, 25/12/2004 will be treated correctly as well, as it's not ambiguous) Kenny: You might find it informative to read Allen Browne's "International Dates in Access" at http://members.iinet.net.au/~allenbrowne/ser-36.html or what I have at http://members.rogers.com/douglas.j....artAccess.html -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aggregating Date Data into Weeks and Quarters | Roger | Running & Setting Up Queries | 3 | July 11th, 2004 05:56 PM |
Date Problem | C Tate | General Discussion | 3 | June 16th, 2004 04:33 PM |
Date Function Problem | RCampbell | Worksheet Functions | 2 | February 2nd, 2004 01:18 AM |
Date formats & Concatenate function | Sue | Worksheet Functions | 2 | November 30th, 2003 04:43 AM |