I’m trying to calculate a the date difference of date - day where the result is date format.
Update PermanentArrears set duedate = Cast(convert(char(8),Datediff(Day, [arrearsdays], [WorkingDate])) As Date)
At some point I got the right result but I do not anymore. Here is the error message I receive:
Conversion failed when converting date and/or time from character string.
You want to be using
dateaddinstead ofdatediffEDIT: you don’t need to convert –
dateaddreturns the same date format that is passed in