We're having a problem with the day and month being switched when trying to save a date value to a SQL Server 2000 database, from an ASP page. The date has a time attached to it.
In our ASP page, we are attaching the date to an ADO parameter as follows:
cmdTC.Parameters.Append cmdTC.CreateParameter("@dtDateReceivedIN",adDate,adParamInput,,dtDateTimeReceived)
The stored procedure accepts the parameter as "DateTime".
When I run the code locally from IIS on my machine, passing in a date of July 6, 2006, the date is properly stored. But when I deploy the code to IIS on the web server and run the code from there, it saves the date in the database as June 7 instead of July 6, so it's getting confused about which is the day and which is the month.
In our ASP page, we are attaching the date to an ADO parameter as follows:
cmdTC.Parameters.Append cmdTC.CreateParameter("@dtDateReceivedIN",adDate,adParamInput,,dtDateTimeReceived)
The stored procedure accepts the parameter as "DateTime".
When I run the code locally from IIS on my machine, passing in a date of July 6, 2006, the date is properly stored. But when I deploy the code to IIS on the web server and run the code from there, it saves the date in the database as June 7 instead of July 6, so it's getting confused about which is the day and which is the month.