Skip to content
Advertisement

A difference of 10 days in Access SQL

I want to show how many orders have been shipped 10 days before the required date in Access SQL, but I can’t seem to get the syntax right.

SELECT COUNT(*)
FROM Orders
WHERE DATEDIFF(day,RequiredDate,ShippedDate)=10;

Advertisement

Answer

SELECT Count(*)
FROM Orders
WHERE (((DateDiff("d",[Orders].[RequiredDate],[Orders].[ShippedDate]))=10));
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement