Strange behaviour after setting session.LCID

D

Darren

I used the following code on a server;

<%
ReturnDateTime 1033, "English (US)"
ReturnDateTime 2057, "English (UK)"
ReturnDateTime 3081, "English (Australia)"
ReturnDateTime 1031, "German"

Sub ReturnDateTime(locale, description)
Session.LCID = locale
Response.Write "<b>" & description & " (LCID = " & locale &
")</b><br>"
Response.Write "Long date: " & FormatDateTime(Date, 1) &
"<br>"
Response.Write "Short date: " & FormatDateTime(Date, 2) &
"<p>"
End Sub
%>

and got the following results;

English (US) (LCID = 1033)
Long date: Wednesday, February 25, 2004
Short date: 2/25/2004

English (UK) (LCID = 2057)
Long date: 25 February 2004
Short date: 2/25/2004

English (Australia) (LCID = 3081)
Long date: Wednesday, 25 February 2004
Short date: 25/02/2004

German (LCID = 1031)
Long date: Mittwoch, 25. Februar 2004
Short date: 25.02.2004

Notice the English (UK) short date format!!! What is going on here?
Why is it displaying in US style even though the long format is
correct??

Can anyone PLEASE help with this one, it is driving me insane!!

I know I can write my own function to format the date, I just want to
know why it is doing this.

Thanks,

Darren.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top