Help with dates?

PaulSpell

Registered User.
Local time
Today, 22:03
Joined
Apr 19, 2002
Messages
201
I have a form based on a table containing ID, Date, Ref & Description.

I want to call the form from another form using a filter to display records relating to a certain date, but no records are being returned.

I think this has something to do with the way that dates are being recorded. I have formatted everything to the UK dd/mm/yy but I think they are still being held as the US mm/dd/yy.

The filter string I've used is:

[Field1]=#01/03/02#

How can I standardise the way that dates are handled?
 
Are your regional settings (of your pc) set to UK? If they're not this will make a difference.
 
If your trying to match dates return records open forms with strings you have to use the US format, ie. mm/dd/yy
 
When using date functions, format your dd/mm/yy date like this

format(YourDate, "mm/dd/yy")

shay
 
Yes, the regional settings on my PC are set to UK i.e. dd/mm/yyyy - but may not be on the PCs belonging to the eventual users of this application.

So to summarise, when using any kind of filter/function etc on dates I MUST use US format even if I have set input masks, formatting and regional settings to UK, is that right?

Does anyone know whether you can change the regional settings on a PC from Access, or is there a way of checking what the regional settings are from Access?
 
I'm not sure that the PCs regional setting is important. I would recommend using an input mask so users are clear how they should input the date and then format your dates to US format for all date functions.

I'm sure someone will correct me if I'm wrong!

shay :cool:
 

Users who are viewing this thread

Back
Top Bottom