Link to home
Start Free TrialLog in
Avatar of Morpheus7
Morpheus7

asked on

Specify timing interval fro change data

Hi experts,
I am currently using the code below to specify a time period for retrieving data for an incremental load of a data warehouse. I have manage to get this to specify a 24 hour period. I would like to be able to specify an period of 1 hour as opposed to 1 day. My current code is:
SELECT DATEADD(dd,0, DATEDIFF(dd,0,GETDATE()-1)) AS ExtractStartTime,  
  DATEADD(dd,0, DATEDIFF(dd,0,GETDATE())) AS ExtractEndTime  

Many thanks
ASKER CERTIFIED SOLUTION
Avatar of Nakul Vachhrajani
Nakul Vachhrajani
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Morpheus7
Morpheus7

ASKER

Many thanks.