www.webdeveloper.com
Results 1 to 5 of 5

Thread: How to change date, time format in IIS

  1. #1
    Join Date
    Aug 2007
    Posts
    8

    Question How to change date, time format in IIS

    I have a local asp application running in iis v 5.1. I found the problem is in the IIS Server, because when I was probing the *.cls methods in a .EXE project, it took the date format from Windows, that is M/d/yyyy, and doing this comparation correctly: 05/15/2008 > 06/01/2008 --> False. But when I was into asp they do 05/15/2008 > 06/01/2008 --> True, it is obvious that it interprets 06/01/2008 as January 6, 2008 instead of the correct form June 1, 2008, and it is also obvious that the problem is in IIS date format.

    I was searching in Internet how to change it and I Found a solution which suggests to include into the global.asa file the code:

    Sub Session_OnStart

    Session.LCID = 1033 ' it is suited for english - United States

    End Sub

    but it didnīt worked, it also suggests that if the solution above doesnīt work, I can place the same code at the top of each ASP page I wish to change the locale settings, but it didnīt work either.

    Please I need some help, because all the date fields within the Informix Database I work with are in the m/d/yyy format.

  2. #2
    Join Date
    Apr 2009
    Location
    Huntley, IL
    Posts
    10
    I am curious why you say
    it is obvious that it interprets ...
    Can you run the following in your code and let me know what is in the variable or if any errors are thrown?

    Code:
    dim theMonth
    
    theMonth = Month("05/15/2008")
    I would think there would be an error if it tries to do anything with a month of "15".

    Also, post some code so I can take a look.

    peace yo!

  3. #3
    Join Date
    Feb 2007
    Location
    Gujranwala
    Posts
    104
    If you have dedicated hosting or have access to server control panel, than simply change the format from "DATE and TIME" option.

  4. #4
    Join Date
    Mar 2012
    Posts
    1

    Date format issue

    hello,
    I am also facing the same problem, did u find any solutiom, please help

  5. #5
    Join Date
    Jan 2008
    Location
    Florida
    Posts
    1,227
    How exactly are you comparing your dates? Please post that code.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles