For the life of me I can't figure out why this is not working.
My SQL Server is set to using US dates. I have a list of dd/mm/yyyy formatted strings that I would like to update the smalldatetime column with.
This:
update ws
set time_dt = convert(varchar(10),[time]
,110),
lasttradedate_dt = convert(varchar(10),lasttr
adedate,11
0)
..comes up with this error:
Server: Msg 242, Level 16, State 3, Line 1
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
The statement has been terminated.
(where columns time_dt and lasttradedate_dt are in the smalldatetime format and columns [time] and lasttradedate are string that look like: dd/mm/yyyy)
I have tried SO MANY different ways. Can anyone help ?? MOST frustrating..
Start Free Trial