• Phil Parkin (12/27/2012)


    10e5x (12/27/2012)


    You are right, definately will have overhead. i try to get it done first before looking at efficiency issue. Actually my problem is defining startDate and endDate. Thanks phil

    OK, I've looked at your original post again. I'm not sure I understand the logic for setting the start and end dates - can you explain it?

    The start date will always be 73 hours before the end date. While the end date will be the nearest 8am but its definitely a datetime of a past. E.g:

    Datetime when package run: 24/12/12 0900

    Startdate: 21/12/12 0700

    Enddate: 24/12/12 0800

    Datetime when package run: 25/12/12 2300

    Startdate: 22/12/12 0700

    Enddate: 25/12/12 0800

    Datetime when package run: 26/12/12 0759

    Startdate: 22/12/12 0700

    Enddate: 25/12/12 0800

    Datetime when package run: 26/12/12 0800

    Startdate: 22/12/12 0700

    Enddate: 25/12/12 0800

    Datetime when package run: 26/12/12 0805

    Startdate: 23/12/12 0700

    Enddate: 26/12/12 0800

    As u can see i want the data to be included from my soure to my staging span accross 73hrs. I want 73hrs worth of event data. So EVENT_D + EVENT_T should be between the Startdate and Enddate

    Thanks in Advance,

    10e5x