Date format in filters

dsigner

Registered User.
Local time
Today, 07:54
Joined
Jun 9, 2006
Messages
68
I have an Access Database on a machine with the Windows date set to dd/mm/yy. All the dates appear on forms in this format. However when I filter on a date field and then look at the filter the date is in mm/dd/yy format.
If I try and set an equivalent filter in VBA from another date field it sends the date in dd/mm/yy format as I would expect but then equally obviously it doesnot find the right records. I have fixed this by breaking down the date and reassembling the date string in American format in the VBA filter. This works fine but I am not happy as I do not understand where the American date type is being set and think that the code may fall over later on.
Does anyone know about this and what is the correct way of handling it?
 
I've found that its better to convert dates to DateSerial when manipulating data including dates. Of course, you need to convert the filter and the data in your table(s) but it avoids the problems you are experiencing and will avoid you code falling over in the future.
 

Users who are viewing this thread

Back
Top Bottom