Answers for "how to get how many days ago in sql"

SQL
0

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

declare @thirtydaysago datetime
declare @now datetime
set @now = getdate()
set @thirtydaysago = dateadd(day,-30,@now)

select @now, @thirtydaysago
Posted by: Guest on May-26-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language