Mina
Mina

Reputation: 315

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;

Upvotes: 0

Views: 36

Answers (1)

AziMez
AziMez

Reputation: 2072

SELECT Count(*)
FROM Orders
WHERE (((DateDiff("d",[Orders].[RequiredDate],[Orders].[ShippedDate]))=10));

Upvotes: 1

Related Questions