So to all my sql friends I know this is a simple question, but I am struggling to get it right.
I need to add month or day to the DocDate field in the PM00400 (we are doing work in Excel not on the table)
So I have been trying
select dateadd(month, 1, docdate) from pm00400
and I get a message 'adding a value to a 'datetime' column caused an overflow.
Recognizing that docdate is a datetime field I have tried
CONVERT(VARCHAR(25), CAST(docdate AS date), 107) - that gives me the date as Jan 01, 2021 - workable but not right yet
So I tried to combine the DATEADD and the above line - and I get the same message.
I know I am close, but what am I missing.
Thanks in advance.