A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Problem with date formats



 
 
Thread Tools Display Modes
  #1  
Old July 14th, 2004, 07:07 PM
external usenet poster
 
Posts: n/a
Default 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  
Old July 14th, 2004, 07:17 PM
Rick Brandt
external usenet poster
 
Posts: n/a
Default 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  
Old July 14th, 2004, 11:03 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 08:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.