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

UK/US date conversions?

Status
Not open for further replies.

brightstar

Technical User
Sep 20, 2002
233
0
0
hey all.
im using calendar control 10 and in the front end of my database. its working fine, it sets the days dae in the filed to the correct date, and its in english format.

but when i send the front end to my customer he selects a date and it gets put into the database as an american format date.
his regional and language settings are set to englidh.. .so what am i missing? can i somehow convert the date coming out or is there a setting ive missed?

free, anonymous advice provided by the whole world
 
If the DBMS you are using is MS/Access then you should be aware that Access uses US date formats (mm/dd/yyyy) for internal conversions regardless of how the locale is set. Dates are not saved in the database in any particular format. They are saved as numeric double values with the date portion before the decimal and the time after it.

Interpretation of dates going into the database is, as I said, based on US formats unless you use some format that is explicit. For example "03/Feb/2004" will be interpreted correctly but "03/02/2004" will be interpreted as April 2, 2004 and not as "February 3, 2004" even if your locale setting is "dd/mm/yyyy".

Dates being retrieved from the database will be displayed in the format specified by the locale unless you have explicitly over-ridden them with a format. If you have left the display format on a date field as "short date" or "long date" then the system will use the locale settings.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top