select the date 30 days less that the todays date sql request

Solutions on MaxInterview for select the date 30 days less that the todays date sql request by the best coders in the world

showing results for - "select the date 30 days less that the todays date sql request"
Alycia
06 Mar 2020
1declare @thirtydaysago datetime
2declare @now datetime
3set @now = getdate()
4set @thirtydaysago = dateadd(day,-30,@now)
5
6select @now, @thirtydaysago