sql date subtract code example
Example 1: sql get number of days between two dates
DATEDIFF(DAY, '1/1/2011', '3/1/2011')
Example 2: sql server today minus n
SELECT GETDATE() - 1
DATEDIFF(DAY, '1/1/2011', '3/1/2011')
SELECT GETDATE() - 1