none
what results should i expect from this datediff? RRS feed

  • Question

  • AND

     

    NOT ( DATEDIFF(DAY,trans_date,trans_respon) between -7 and 7)

    Using these dates as examples, which set or sets should i get back based on the line above. I believe i should be getting back sets (1 and 4). From what i read and understand, it should return records that the difference between the 2 dates is greater than the 7 day window..

    Set#1  2003-12-15 22:38:12.000 / 2003-03-31 11:48:52.000
    Set#2  2007-03-01 08:43:05.000 / 2007-03-02 10:41:45.000
    Set#3  2007-03-06 08:14:19.000 / 2007-03-06 09:06:58.000
    Set#4  2007-03-22 10:18:07.000 / 2007-04-05 16:15:08.000

    Friday, September 3, 2010 4:01 PM

Answers

  • yes, u r right. it will return 1 and 4 records..

    Nothing but  "datedifference not between -7 and 7"  , so where the dates difference is more than 7 (+ve or -ve)

     

    set #1,set #4  (diff. is arround 9 months and 12 days)

     

     

    • Marked as answer by Cubangt Friday, September 3, 2010 5:33 PM
    Friday, September 3, 2010 4:06 PM

All replies

  • yes, u r right. it will return 1 and 4 records..

    Nothing but  "datedifference not between -7 and 7"  , so where the dates difference is more than 7 (+ve or -ve)

     

    set #1,set #4  (diff. is arround 9 months and 12 days)

     

     

    • Marked as answer by Cubangt Friday, September 3, 2010 5:33 PM
    Friday, September 3, 2010 4:06 PM
  • thanks
    Friday, September 3, 2010 5:34 PM