how to calculate date difference in access query?
SELECT DateDiff("yyyy",#01/01/2010#,[DateofSale]) AS Expr1 FROM ProductSales; Returns the difference between Date2 and Date1 (consider Date1 as oldest and Date2 as newest) as number of 'Years'. Result: Difference between the values in the field "DateofSale" and the date "01/01/2010" as number of 'Years'.