OK, I thought I was pretty good with SQL…I have to do a comparison between two datetime columns.
Could someone explain the difference between
DateA > DateB
and
DateDiff(d,DateB,DateA) >= 1
I thought these two statements were functionally equivalent, but I guess I was wrong…
checks if DateA is bigger than DateB (01/12/2012 14:50:01 is bigger than 01/12/2012 14:50:00).
checks if the difference in days (datepart
das first argument) is equal or bigger than 1 day.