• Thom A - Tuesday, May 1, 2018 9:58 AM

    Jeff Moden - Tuesday, May 1, 2018 9:37 AM

    I'll be interesting as hell to see what happens during a "wrap around" when the start day is a Thursday and the end day is a Monday.  And what of a possible multi-week span?  I think this whole thing could be a real problem in the future.

    I think the OP caters for that already, Jeff. They have a Start Day of Friday and End Day of Monday, resulting in a value of 3. 🙂

    Yep... still a wicked bad idea.  They should use dates, instead.  If they don't have them, they need to change their data collection method because using DOWs is a silent failure accident waiting to happen.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)