I need to insert the value ‘27/02/2005’ to a “datetime” sql server field.
can’t do any manipulation of this value via application, it must be in an sql statement.
when I try this:
insert into disma (startdate) values( '27/02/2005' )
I get:
“Out of range value for column ‘startdate’ at row 1”
it’s because the value is in the format dd/mm/yyyy and not mm/dd/yyyy
I tried this:
insert into disma (startdate) values( convert(datetime, '27/02/2005', 105) );
got:
“You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘‘27/02/2005’, 105) )’ at line 1”
suggestions ?