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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

International Date Format Issue

Status
Not open for further replies.

vpekulas

Programmer
Jan 8, 2002
154
CA
Here is my problem, I have an application that gets distributed all around the world and it relies
heavily on dates. (It runs on both MS Access and MS SQL)

When I need to insert today's date I simply use the Now() for MS Access or GetDate() for MS SQL.
This works nicely in every country and locale setting I came across.

The problem arises as soon as I need to assemble dates other then today. For example i let the users
select month, day and year from dropdown menus. Then I assemble the date and insert it to the DB.
Then I have to retrieve it etc.

The problem becomes very obvious as soon as the date is something like March 2nd 2004 generated
as 03/02/2004, in many cases the date gets turned around to 02/03/2004. No matter what I do
(LCID, different way of date assembly etc.) it won't work.

Does anybody have a workaround, or similar situation ?

Thanks.

"Taxes are the fees we pay for civilized society" G.W.
 
Which format do you use when formating the date ?



"Taxes are the fees we pay for civilized society" G.W.
 
I'll use this one

FormatDateTime(Date(),2)) the output will be 03/10/2004
 
Wouldn't that resulted in the same problem when the date is somthing like 05/05/2004 ? Or does the FormatDateTime function always the LCID setting ?


"Taxes are the fees we pay for civilized society" G.W.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top