Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: get the first and last day two months ago

    I think that this will solve what you are asking, let me know if I misunderstood what you are looking for.

    DECLARE

    @numMonthsINT

    ,@targetDateDATETIME

    ,@firstDayDATETIME

    ,@lastDayDATETIME

    SELECT @numMonths = 2

    SELECT @targetDate = DATEADD(MM, @numMonths * -1,...

Viewing post 1 (of 1 total)