View Full Version : English dates in Internet Explorer

02-21-2006, 12:56 PM

I am a beginner ASP programmer and I am writing an application for Internet Explorer in the UK. I have found that some of the computers on our intranet at work display dates in Internet Explorer in English format, and some in American. However, when I look in Control Panel at the regional date settings, they are all set to English date. But IE still shows the date as American.

What is more mystifiying is that the dates in my Access database are correctly in the English format. It is as if Access can interpret the dates correctly when saving and retrieving, but IE and ASP cannot when performing calculations or displaying on the screen. There surely must be a way of telling IE to follow the computer regional settings when it stores dates in memory?

I would really appreciate help with this.


02-21-2006, 02:21 PM
You need to change it on the Server, not the clients.

03-07-2006, 03:32 AM
And/or to make a variable be in the format of dd/mm/yyyy (and the final line of code can be modifed for other date formats), perhaps try something like the following which you might even make into a function that you could put on a page that gets included in your main pages:

varFld = CDate(MyVariable)

intMonth = Month(varFld)
intDay = Day(varFld)
intYr = Year(varFld)

' Pad with leading 0 if needed.
strMonth = Right("00" & CStr(intMonth), 2)

' Pad with leading 0 if needed.
strDay = Right("00" & CStr(intDay), 2)

strYr = Right(CStr(intYr), 4) ' And change the 4 to 2 for 2 year date format.

varFld = CStr(strDay & "/" & strMonth & "/" & strYr)