Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    English dates in Internet Explorer

    Hello

    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.

    Thanks,
    Trimtrom

  • #2
    Senior Coder
    Join Date
    Nov 2002
    Location
    North-East, UK
    Posts
    1,265
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You need to change it on the Server, not the clients.

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    478
    Thanks
    0
    Thanked 2 Times in 2 Posts
    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)
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •