jenn5175
06-27-2002, 02:46 PM
Okay, this may seem like a dumb question - how can I consistantly get the date displayed as mm/dd/yyyy? I have never had this problem before. I have a simple form which inserts 6 dates into a SQL database table with datetime fields. Now sometimes when I put for example 6/27/2002 in the textbox, it will insert it. Sometimes it will send it to the database as 27/6/2002 so that the database rejects it. I was getting frusterated so I simplified the test a bit using "date()": sometimes when I response.write date() or now() I get 6/27/2002. Then on a random refresh of the page it will begin displaying it as 27/6/2002 - but even when it is doing this day(date()) will still pull the correct day - 27 out so IIS KNOWS which part is the day and which is the month, it just switches them. Also I have tried using dateformat() to no avail. It still comes out as 27/6/2002 when it decides it wants to. I have checked my server's regional settings to assure the dateformat is "mm/dd/yyyy". Is there somewhere else I could check on the server besides that? How about in IIS? I cannot find a pattern to when it is switching so I am utterly confused. The page will work fine sometimes for an hour, sometimes for 5 minutes. But once it switches to dd/mm/yyyy I have not yet seen it switch back to mm/dd/yyyy. I am thinking it is a server setting somewhere because I have written code like this many times and never ran across this issue - however we just built a new webserver a few weeks ago. Any help would be MUCH appreciated!!!
Jenn
Jenn