SQL DATEDIFF Not working!?
- by James
Hi all,
I am running a simple DATEDIFF query but it doesn't seem to calculate the days properly or i'm doing something wrong.
If I run
PRINT DATEDIFF(Day, 2010-01-20, 2010-01-01)
RETURN 19
Which is correct. If i change the month in the first date to Feb (02) I get something strange.
PRINT DATEDIFF(Day, 2010-02-20, 2010-01-01)
RETURN 20
Now…