473,545 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session.LCID changing has no effect


My config : Windows 2003 x64 (US VERSION) + sp2, IIS 6
All regional settings to French (even for default user)
In my ASP pages dates are in the good format (french:dd/mm/yyyy), but
impossible to have US date format when i set the Session.LCID=10 33
I did a simple test:
ReturnDateTime 1033, "English (US)"
ReturnDateTime 1036, "French"
ReturnDateTime 2048, "English (UK)"
ReturnDateTime 3081, "English (Australia)"

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



English (US) (LCID = 1033)
Long date: Monday 27 August 2007
Short date: 27/08/2007
1,05 €
1 000 000,00

French (LCID = 1036)
Long date: lundi 27 août 2007
Short date: 27/08/2007
1,05 €
1 000 000,00

English (UK) (LCID = 2048)
Long date: lundi 27 août 2007
Short date: 27/08/2007
1,05 €
1 000 000,00

English (Australia) (LCID = 3081)
Long date: Monday, 27 August 2007
Short date: 27/08/2007

The English US format seems to be ignored.
If i change some settings for the french format (ex:decimal , to .),
changes are applied to the English US format too !!

I tried something else:
I set the server to English US and I apply regional settings to "all
settings to the current user account and to the default user profile".
I reboot and I logon as admin and set my regional settings to French but
NOT for the default user profile.
So i have in regestry hkey_users with English US and hkey_current_us er
with French
Now i logon, and test my asp page i have the right values when setting
the Session.LCID.
But it's not a good solution, because i have to logon to get working.
Why it's not possible to get English US format when hkey_users &
hkey_current_us er are set to french ?

I'm fed up with this problem.

Any help will be welcome.
Aug 27 '07 #1
0 3593

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

Similar topics

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 date in brazilian date format. Example: <% @Language=VBSCript %> <% Session.LCID=1033 %> <% Response.write (now & "<BR>" & Session.LCID) %>
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. when i run it i get the following error Error: Type mismatch: 'DateValue' /calendar/inc_default.asp, line 77
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 direction of a list of countries and their associated lcid Cheers!
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 create a VB-based object, the object still seems to use the system LCID for formatting dates & numbers. Using FormatDateTime() within the VBScript...
by: Darren | last post by:
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
by: J. Baute | last post by:
I'm doing some tests to see if the Session.LCID can be used to easily change a user-dependant locale for number & date/time formatting in ASP. As far as I get the theory this should work, but I'm concerded that there might be some issues when serverside regional settings are changed. I'm having this one case where I'm having something odd...
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 output from the hyperlink. I need to have to querystring in Session.LCID = 1033 and the display date in Session.LCID = 2057. Coding :-
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 and no problems. What do I have to do in order to get Slovak to work on the same server? Regards, Hagge
by: ubi_comp | last post by:
Hi, I have a windows 2003 server IIS6 machine in development environment. I set Session.Lcid in aspx Page1 and move to aspx Page2 and use Session.Lcid value that I set in the Page1 without any problem. Recently I started preparing a new machine with same configuration but now
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.