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

Good Algorythm to store Dates

Status
Not open for further replies.

elibb

Programmer
Oct 22, 2001
335
MX
hi, i work on vb6.0, and i use my databases sometimes in access and sometimes in SQL Server, and i always get the same problem:
the Dates, work perfect in my computer, but when im in my client's they get all mixed up, like 03-07-2003 could be 7th of march or 3rd of july, and im tierd of this problem, because i need to have all the computer configured to a specific format, and sometimes i cannt control that.
does anyone know a good algorythm to save the dates in a numeric format, and then get the Date value back??
or does anybody has another solution?? its something i havent been able to fix in a very long time, and i really need it.

thank you very much

Eli
 
Check out the explanation by CCLINT in thread222-543368. This explains the difference in US and Non-US formats and why they are interpreted differently.
 
If one second resolution is sufficient for your purposes you can store the "unix" time as a long in your database and then reformat it according to the user's locale.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top