I’ve been trying to do a simple update to a datetime column on a sql azure database to no avail, not sure why it’s not working.
UPDATE MYDB
SET EndDate = CONVERT(datetime, '2012/12/04 24:00:00', 102)
where ItemId = 30
GO
error: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
The statement has been terminated.
Your syntax is ok – but the time value of 24:00:00 is out of range. If you meant midnight, use 00:00:00.