473,395 Members | 1,937 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Strange behaviour after setting session.LCID

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.
Jul 19 '05 #1
0 1398

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Claudio Cezar | last post by:
I live in Brazil and i am trying to set my application to work with american date format. The problem is, even when i set the LCID property at the beginning of my code, it always returns the...
5
by: b_boy | last post by:
Hi all, I recently downloaded a calendar that i am trying out for a client. It works fine when i test it on my machine..however when i test it on the hosts server it can't handle the date format....
2
by: grw | last post by:
Trying to locate the list of valid lcid's on MS's site and googled. Ive toiled long and hard, but alas I cannot locate the information. (previous links moved) Could anyone point me in the...
0
by: David Patow | last post by:
Can anyone explain why neither ASP Session.LCID nor VBScript SetLocale() effect the locale of a VB6-based COM object that is instantiated via Server.CreateObject()? If I set Session.LCID, then...
8
by: Rob | last post by:
Hi all, Is it possible to change the Session.LCID in a hyperlink? My problem is I'm calling a Date from a database to use as a querystring in the hyperlink but I also need to display the date as...
1
by: Hagge | last post by:
We are translating our web shop to Slovak but when I use Session.LCID=1051 for slovak do I get the error "Invalid LCID". The same shope use Swedish = 1053, Norwegian(Bokmal) = 1044, English = 1033...
0
by: theintrepidfox | last post by:
Dear Group I came accross a very annoying behaviour of Visual Studio, giving me six hours of headache till I found the solution. This post is mainly for fellow developers for reference as it...
8
by: mantrid | last post by:
Hello Im having problems working out why the following code does not work. I dont think its the sql as the error occurs on the first update which ever one is put there ($q1 or $q2). Ive swapped...
11
by: Glenn | last post by:
Hi I've been experimenting with managing state using the Session object. I've created a simple WS with a couple of methods, one which sets a string value, another that retrieves it. Each...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.