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!

non-US Locale Date problem

Status
Not open for further replies.

bvahan5

Programmer
Jun 11, 2005
63
RU
Web server is in US. Customer is in Russia (11 hrs difference, they use DD/MM/YYYY style of date). I store dates in my Access DB.
Have no problem when dealing with US dates.

Also have no problem when store current day-time
now2=DateAdd("h", 11, now1)

The problem appears when I try to store the day that customer enters into input box.

1.
when customer enters 15/6/2008 (Russian style of date) in the input box it stores date in DB in a normal way

however when they store 1/6/2008 it switches by itself day-month and stores 6/1/2008 in DB
otherwords when first number which is a day in Russian format is more than 12 ASP switches day and month automatically

2.
setLocale(1049) (Russian locale ID) does not help at all

any ideas?

 
Use 3 input boxes - one for day one for month, one for year and concatenate the output as MM/DD/YYYY which will keep Access happy

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
one of the points that causes a mess is that ASP does NOT keep Date format precisely.

if you will type in "1/6/2008" it will assume that it is Jan 6, 2008
however when you will type in a wrong manner like "13/6/2008" ASP will assume that it was your typo (13th month) and will switch by itself numbers and get the value of June 13, 2008

so when people out of US (i.e. Russians) type THEIR correct format like last one shown here (where 13 is a day) in the simple input box, ASP liberal play with dates causes a mess
ASP does not allow to get a date-like srting data "1/2/2008" to be passed thru form to next script as a string. It accepts immidietely a string as a date and freely plays with it, switching "day" and "month" in very illogical manner.

 
I guess you didn't read my answer very carefully.

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
most people, including myself, use the method that johnwm described above. it always works. (actually, a pull-down menu would be sort of error-proof.
cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top