Loading date depending on Date and Time

  • All,

    I am working on creating an ssis package to move the data from one source to multiple destinations depending on Dates and Time for diffrent destinations.

    Can someone help in setting up Variable or Expression which i can use to specify time. e.g i need to move the data from Yesterday 7:00 AM to Today 7:00 AM.

    My major problem is to setup time not the date but if you have better solution for both i will take it..

    Thanks..Ad

  • Not sure how to do it is SSIS off the top of my head, but if you use a SQL Task to do the work for you the following should help:

    select dateadd(hh, 7, dateadd(dd, datediff(dd, 0, getdate()) - 1, 0)), dateadd(hh, 7, dateadd(dd, datediff(dd, 0, getdate()), 0))

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply