Calculate last years dates from this years start/end dates

  • I know this one's easy, but it's Friday, and I'm tired.  But, I am passing a start date and end date via parameters into a stored procedure.  And, I need to set variables that where it's the same month/day for each, but for last year. 

    There are probably 100's of you that have done this, but I haven't had the pleasure. 

    How?

  • dateadd(YY,-1,@DateVar)

  • Thank you very much.  That was much too easy.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply