Question with SQL DateDiff
Posted on 2011-03-04
I have a table in a SQL 2000 DB that I want to get the number of days between 01/01/1995 and the transaction date (this is automatically populated by our system). However when I run the below code it is returning the number of days as 38505 for a date of 18/11/2010, but it should be returning 5801.
select *, DateDiff ((day, 01/01/1995, Transaction_Date)+1) as No_Of_Days
Any help welcome