Solved

Date Format on IIS/Win2000/asp

Posted on 2002-03-10
3
189 Views
Last Modified: 2009-07-29
Hi,

I am developing using ASP.

I am aware of a problem with date format where you cannot predict whether the year format coming back form ASP/IIS is going to give 4 characters or just 2.

I have taken measures to ensure this does not cause me any difficulties

However, I have just switched from PWS and win 98 as my off-line dev environment, to win 2000/IIS5.

The problem is that running my web application locally I am seeing the date in the format mm/dd/yyyy when, being in the UK I would like to see it dd/mm/yyyy.

As stated before, the year format is coded for, but I suspected the dd/mm format could be set on the machine.

In control panel, Regional settings I have the correct date format displayed, soi I thought it must be set somewhere in my IIS ... anyone any clues.

Many thanks


0
Comment
Question by:jonesgj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
AndresM earned 100 total points
ID: 6855053
See if this helps:
INFO: Behavior of Date/Time Format Differs When Accessed from Active Server Pages (Q306044)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q306044
0
 

Author Comment

by:jonesgj
ID: 6859764
I have tried modifying the registry as suggested with no success.

I used the paras referring to IIS5/SP2:

-----------------
IIS 5.0 (Windows 2000 Service Pack 2 and Later)
In Windows 2000 Service Pack 2 (SP2), the default behavior is as mentioned above. However, you can also customize the settings: you can either change the base OLEAUT component or change IIS so that it can enable this change in OLEAUT.

You can set the registry entry for OLEAUT globally. This does not override a process that explicitly sets the option by using the exposed call. Thus, if you set the following IIS value, you override the OLEAUT setting.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLEAUT
VarConversionLocaleSetting = 0,1,2 (DWORD)
NOTE : The OLEAUT key may not exist. If it does not, you must create the key first.

You can also set the value for IIS, which also overrides any global setting for OLEAUT. Moreover, IIS will call this OLEAUT application programming interface (API) whether or not the registry entry is set.
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters
SetVarConversionLocaleSetting = 0,1,2 (DWORD)
The values of 0, 1, and 2 are the same for OLEAUT and IIS and are defined as follows:
0 - The default behavior, as stated earlier. This format is completely random. It is based on the last user or process that set the cache.
---------------------

Normally I wouldnt be in the registry, so I hope I have made the alteration/additions correctly.

I am logged on as the administrator whose locale settings are correct. I am accessing my asp pages using ie5 on my local (PWS) server.

0
 

Author Comment

by:jonesgj
ID: 6878405
Thanks AndresM.

I used the snippet of code in the asp.net section in my first asp page that loads, and this seems to set the date to my local settings ... its works.

0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
First of all let me say that the only language that I speak is English, but in answering questions here I often come across people whose English skills are not the best and I’d like to be able to communicate better with them, and the following descr…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question