03Explorer
Technical User
I want to generate a datetime field for two variables that have hours as Midnight and 11:59 from current time. Formulas I am using:
Reason for 3 days from current is we are pulling for historical data that is guaranteed to have data 3 days back.
I want start date to have a time of 12:00am and end date to be 11:50pm. This code gives me the days back, but with the same time of current execution time.
Code:
SET @StartDate = dateadd(d, -10, getdate() )
SET @EndDate = dateadd(d, -3, getdate() )
Reason for 3 days from current is we are pulling for historical data that is guaranteed to have data 3 days back.
I want start date to have a time of 12:00am and end date to be 11:50pm. This code gives me the days back, but with the same time of current execution time.