I need to calculate the difference between two weeks using dates.
I have two date columns orderplaced_date, orderdelivery_date.
i used the logic datediff(orderplaced_date,orderdelivery_date,‘WK’) it is calculating like difference between two dates and if difference <7 then displaying 0
As per below sceen shot Aug 27th and Aug 30th are in same week (2024-35) and
sep 3rd and 5th are in 2024-36 th week so the difference should be -1 , but it displaying 2 values -1 and 0 .
can you help me, how to use correct formula /logic here to get below output
2024-35(aug 26 to sep 1st)
2024-36(sep 2nd to sep 8th)
2024-35 - 2024-36 = -1