• KGJ-Dev - Friday, January 19, 2018 9:16 AM

    Hi,

    I need to get Year, monthname in three letters, startdate and enddate  of the month for last two years based on today’s date. Any sample query please

    You need to tell us how you intend to use the result.  It WILL make a difference in what the EndDate should actually be (End of Month may NOT be the right value for this).  I know you may not understand that right now so tell us how you're going to use the result so we can address that for you.

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