Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dates.. Yet another dilemma

Status
Not open for further replies.

faztech

Programmer
May 21, 2001
22
AU
Hi,
I am having some troubles with dates and sql. I am building a system that requires me to select a range or records between specified dates. As I am in Australia the dates that I use are in Australian format (dd/mm/yyyy). Well the problem is I know that Access Sql uses American format so I use the Format() function to change the date to American but I still am having troubles. I get the dates then pass them to a function in a dll. When I debugged my code I found that when I passed the date through it swapped it around back to American format.
Does anyone have a solution to this. I have tried everything?

Thanks

Faztech FAZTECH
:p
 
I've had the same problem as well, but managed to solve it by using a 3 letter month and a 4 digit year.

The date will be taken based on your 'date/time regional setting' and your application as well.

so your format statement should use 'dd/mmm/yyyy' or 'mmm/dd/yyyy' or 'dd mmm yyyy' or any other combination as one of the format parameter.

hope this helps.
 
Faztech -

Try formatting your dates like 26-sep-2001. Pretty much everything is able to recognize that, and most users won't complain about it either.

Chip H.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top