I am trying to get the number of days between two dates. Here is the Expression I am using in Access Query Designer. (Access 2007)
Expr1: DateDiff('d',[Accept Date],[Sent Date])
The query is returning #Error.
The [Accept Date] and [Sent Date] format is yyyymmdd and the Data Type is TEXT. I changed it to Date/Time but Access purged the data.
Here is the SQL behind the Query if that helps:
SELECT RTG.[PRO NO], RTG.[Service], RTG.[Sent Date], RTG.[Accept Date], DateDiff('d',[Accept Date],[Sent Date]) AS Expr1
FROM RTG
WHERE (((RTG.[PRO NO Prefix])<>"215") AND ((RTG.[Invoice Number])="8548"));
This has got to be something simple, right?