I am trying to migrate an old classic asp application to IIS 7.0 with win2k8 and I definately don't want to change the old code if I can help it.
I have set a date format in the Customise Regional Options in the Date formats in the regional and and language options in the control panel to dd-MMM-yy.
I am still getting Conversion_failed_when_converting_datetime_from_character_string errors using this date format even after reboots.
I am using also using SQL Server Express 2005.
Where else do you need to set date formats? Should they all be picked up from the machine setting?
The old code does something really dumb, but again I don't want to have to change it and then test it all again.
The old code effectively does this "Insert Into MyTable (ThisDate) Values ('" & Now() & "')"
Generates Insert Into MyTable (ThisDate) Values ('17/03/2009 3:40:48 p.m.')
Msg 241, Level 16, State 1, Line 1 Conversion failed when converting datetime from character string.
What it's ACTUALLY complaining about is the "p.m." part of the string dispite the Region settings on the machine specifying to NOT use this.