getdate minus 1 day in sql server code example Example: sql getdate minus 1 day without time DATEADD(DAY, -30, GETDATE())