I'm trying to include a field that shows the difference between 2 dates within a query used in Access. I have it within the SELECT statement as below:
SELECT O.Ship_Date, O.Drop_Date, DateDiff('day', O.Ship_Date, O.Drop_Date) AS Gap_Days
From Orders AS O;
When I save this in the SQL view and go to Datasheet view, the two dates populate, but the calculated Gap_Days field shows as '#Func!'. I'm guessing it's saying I have some function syntax error, but I can't figure out what it is.
I've also tried
SELECT O.Ship_Date, O.Drop_Date, DateDiff('day', [O].[Ship_Date], [O].[Drop_Date]) AS Gap_Days
From Orders AS O
But I get the same result. Anyone have any ideas?
Thanks in advance.