between now and 2 days ago sql code example Example: 3 days back in sql server DATEADD(DAY, -3, GETDATE())