Note: I debated whether this should go in ASP forum or SQL Server forum and I think it belongs here.
Ok, I have a classic ASP web application, a custom intranet, which has been used in 7-8 different installs, 3-4 different servers with no issues.
It uses a SQL Server 2005 database and usually MS Server 2003 and has dates heavily used throughout. Adding various items (news, announcements, careers, events, etc, etc) has never been an issue.
I recently had to install this on SQL Server 2005 Express and Windows 2000 Professional Terminal Server.
For some reason now, a date of 2/1/2009 gets saved as 1/2/2009. I had a look at the date format on the Win2000 box, which was set to dd/mm/yyyy as opposed to the usual mm/dd/yyyy that all the other servers had that this app was installed on. So, I changed the date format to mm/dd/yyyy, rebooted and still the dates get screwed up!
I have verified that all databases, logins, etc have a locale of us_english. The locale hasn't changed from the original SQL Server to the Express edition.
I can fix this by changing the code to
rs("field") = month(date) & "/" & day("date") & "/" & year(date)
But that's a lot of hunting through thousands of lines of code to change. Is there a setting somewhere that I'm missing?