C
Chopper
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
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