how to sum and subtract date in sql code example Example: sql server today minus n SELECT GETDATE() - 1