How do i format a insert statement with date time for this collation…
Currently:
string SQLst = "UPDATE [LASTUPDATE] SET last_update = '" + DateTime.Now.ToString("yyyy-MM-dd") + "'";
This works for Latin1_General_CI_AS but now on a different server i need this statment to work with server set to collation SQL_Latin1_General_CP1_CI_AS
this is the error i get:
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value
Would be great if you do as @Jon Skeet said, but if you cant, than use CONVERT