473,480 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

LCID and Date format

I realise this question has been raised many times but I am still no wiser
as to why setting the locales will not work in my ASP application. I have
searched on google groups etc. and tried numerous solutions to no avail.

Basically, I am trying to get ASP to output the dates in the UK Format but
nothing seems to work.
1.I have tried setting Session.LCID to 2057 in both session onstart,
individual pages and the language declaration at the top of pages.
2.I have checked the locale settings in the regional settings on the server
and for some reason the short date format was M/dd/yyyy (despite being set
to UK) so I amended that and had the server rebooted.
3.I don't have the duplicate locale entries in the registry that someone
else said caused problems for them.
4.I am pulling the date from a SQL DB as well as putting <%=now()%> on the
page but the results are the same.
5.After setting the LCID I have got the page to output the LCID to prove it
has been set.

I have also looked at the www.aspfaq.com site and tried the example code at
the top of: http://www.aspfaq.com/show.asp?id=2260
These are the results:
English (US) (LCID = 1033)
Long date: Monday, November 17, 2003
Short date: 11/17/2003
English (UK) (LCID = 2057)
Long date: 17 November 2003
Short date: 11/17/2003 ***(WHY???)***
English (Australia) (LCID = 3081)
Long date: Monday, 17 November 2003
Short date: 17/11/2003
German (LCID = 1031)
Long date: Montag, 17. November 2003
Short date: 17.11.2003

I've tried other things also, but cannot remember them at this moment.

I have considered going through and formatting the date myself but although
it will solve the problem for this particular application I really want to
know what the issue is so that I can fix it rather than work around it.
I am using Windows 2000 Server (IIS 5) which was installed by the hosting
provider.

Any ideas/help is much appreciated.

chopper

Jul 19 '05 #1
4 12873
> 2.I have checked the locale settings in the regional settings on the
server
and for some reason the short date format was M/dd/yyyy (despite being set
to UK) so I amended that and had the server rebooted.


So, is it still m/dd/yyyy? I would bet it is. There might be some software
installed that is forcing this...
Jul 19 '05 #2

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uA**************@tk2msftngp13.phx.gbl...
2.I have checked the locale settings in the regional settings on the server
and for some reason the short date format was M/dd/yyyy (despite being set to UK) so I amended that and had the server rebooted.


So, is it still m/dd/yyyy? I would bet it is. There might be some

software installed that is forcing this...


I'm afraid not :o(
Since the reboot I've checked the date formats and they are all correct:
Short date sample: 17/11/2003
Short date format: dd/MM/yyyy (this is what I changed it to pre-reboot)
Long date sample: 17 November 2003
Long date format: dd MMMM yyyy

There is no additional software installed on the server except for what I
believe is the backup software installed by the hosting provider.
Jul 19 '05 #3
> is the backup software installed by the hosting provider.

So have you asked the hosting provider about this??
Jul 19 '05 #4

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:OZ**************@TK2MSFTNGP11.phx.gbl...
is the backup software installed by the hosting provider.


So have you asked the hosting provider about this??


I got in touch with the hosting provider and the problem is now solved.
They changed a registry entry:
(HKEY_USERS/.DEFAULT/Control Panel/International/sShortDate) value to
dd/MM/yyyy
Unfortunately they didn't tell me why this was invalid in the first place.
I can only assume this is the entry changed by setting the short date format
in the regional settings control panel. I guess it was incorrectly set at
install of the OS or subsequent applications.

Many thanks for your help Aaron.

chopper
Jul 19 '05 #5

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

Similar topics

0
2316
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
3219
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....
0
1271
by: A_Dude | last post by:
Hi all, I've recently installed a calendar that I downloaded but I'm having a bit of a problem with the date settings. I thought setting the LCID value would help which it does but brings another...
2
1930
by: A_Dude | last post by:
I posted this but got no response so hey...why not try again...I'd like to know if it is just not possible or am I missing something. I'd appreciate a pointer...article , something to help me...
0
1403
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" ...
2
1304
by: J. Baute | last post by:
When using Session.LCID to set different locales for different users using a webapp, is it possible to change those locale specific settings somehow? Let's say some picky user doesn't like a date...
8
4835
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...
0
3580
by: Just4U | last post by:
Hello, 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...
2
7760
by: Just4U | last post by:
Hello, I take an old post because, nobody seem to answer my problem. Config: Windows 2003 x64 (US) + sp2 Regional settings : French (for all & default users) Basically I have the following...
0
7037
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
6904
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...
1
6730
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...
0
6873
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...
1
4767
isladogs
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...
0
2990
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...
0
2976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1294
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 ...
0
174
bsmnconsultancy
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...

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.