locked
How can I select data that last modified date is not changed for more than six months. RRS feed

  • Question

  • User-1355475649 posted

    Hello, I`m making a stored procedure, and have a question.

    As you can see, I want to select date last modified date = not changed for more than six months.

    For example today is 26/09/2016, so if I execute that SP, modified date is before 26/03/2016 items showed.

    Please, help me how can I make it, Your advice or give me some examples or tutorials about that. Thanks

    Monday, September 26, 2016 7:22 AM

Answers

  • User364663285 posted

    Try

    ...
    where [last modified date] < dateadd("m",-6,getdate())

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 26, 2016 7:34 AM

All replies

  • User364663285 posted

    Try

    ...
    where [last modified date] < dateadd("m",-6,getdate())

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 26, 2016 7:34 AM
  • User-1355475649 posted

    Oh Thank you wmec, I tested it in my SP and it works well!!!

    Tuesday, September 27, 2016 5:07 AM