Click to See Complete Forum and Search --> : How to change date, time format in IIS


carjbga
05-11-2009, 06:49 PM
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.

namyaf
05-14-2009, 02:04 PM
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?


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!

itHighway2007
05-16-2009, 01:36 PM
If you have dedicated hosting or have access to server control panel, than simply change the format from "DATE and TIME" option.

amita13_shenoy
03-30-2012, 01:18 AM
hello,
I am also facing the same problem, did u find any solutiom, please help

yamaharuss
03-31-2012, 12:03 PM
How exactly are you comparing your dates? Please post that code.