Wednesday, 18 March 2020

MSSQL - Fix Error - Argument data type datetime is invalid for argument 2 of dateadd function.

Watch this example on YouTube



1. To Fix it replace
select DATEADD(DAY, GETDATE(), -1)

with

select DATEADD(DAY, -1, GETDATE())

No comments:

Post a Comment