• sreid08 (9/4/2009)


    I have this page bookmarked because I can never remember how to get the last day of the month -- or some other date functions. It is very helpful:

    http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/%5B/quote%5D

    Please see my previous post 2 posts above. 😉 The method at that site misses a whole second of the day and if you have data with times, it could mean that you miss a whole lot of data. Don't use that method... ever.

    --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)