DateTime function

  • Hi...How can I get the Same day of Last year?? please give me the sql query...

    Thank you

  • ssismaddy (5/7/2009)


    Hi...How can I get the Same day of Last year?? please give me the sql query...

    Thank you

    And what have you tried? Have you looked in BOL regarding datetime functions?

  • thanks for the response... I m trying weird commands like select getdate()-1 or year(getdate())-1)...

    still I m trying to search BOL....if you could help me thats gr8 for me...

  • got it ...

    select dateadd(year, -1, getdate())

    Thank you

  • Glad to see that.

Viewing 5 posts - 1 through 4 (of 4 total)

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