Get Records of Last 12 Months

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mudassir
    New Member
    • May 2012
    • 85

    Get Records of Last 12 Months

    Hi every one.
    i want to write a query to get the records of last 12 months in sql like in
    LINK
    in its ARCHIVES section at side bar.

    any kind of help will be greatly appreciated.

    Regards
    Mudassir
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    Code:
    SELECT * FROM YourTable WHERE Date Between GETDATE()-365 AND GETDATE();

    Comment

    Working...