Date in MS ACCESS 97 query

  • Thread starter Thread starter PRAV
  • Start date Start date
P

PRAV

Hi, I need to display the total number of projects of Agreed date that
is greater than Anticipated date and the differnece should be between 1
to 14 days. My query is

SELECT Count(ProjectID) AS Count_ID
FROM tblProjMilestones
WHERE (((Agreed_Date)>=[Anticipated_Date]+14));

However i'm not getting the correct answer. Could you please tell me
what i'm doing wrong.
 
try this:

SELECT Count(ProjectID) AS Count_ID
FROM tblProjMilestones
WHERE
(DateDiff("d", Anticipated_Date, Agreed_Date) >=1 )
AND
(DateDiff("d", Anticipated_Date, Agreed_Date) <= 14 )


Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Back
Top