Hello All
I want to update the due date field in task but in my database i have the date and the
time in two columns separate I want to merge the “ENDDATE” and “Due date” Fields
into the new DateTime field “DueDate”
with this sql statement :
Update Mydatabase..Mytable
set Duedate
= CONVERT(NVARCHAR(19),
CONVERT(VARCHAR(12),
CAST(ENDDATE
as DATE))
+
' ' +
CONVERT(VARCHAR(12),
CAST(due
as Time)), 101)
where Due
is not
null
but I am
getting this error message
Msg 241, Level 16, State 1,
Line 1 Conversion
failed when converting date and/or time from character string.

Can anybody
help me out Please
Thanks,