How would I go about updating existing DateTime columns in an update statement? I'd like to subtract one day but I get an error message saying that I cannot use DateAdd in an update (something about an overflow).
I came up with this query but of course it will not execute.
begin tran upd
update answer
set SentForApprovalAt = DateAdd(day, -1, approvedAt)
where
approvedAt > '1753-01-01'
and approvedAt < modifiedAt
commit tran upd
What do I do?