-
Getting a count of specified records in a query
I have a query that calculates the date difference between an expiry date and todays date using DateDiff("d",Date(),[AccredExpiryDate]).
I need to get a current count of the number of records in a specific range, i.e. a count of the number of records that are between 0 and 90 days, over 90 days, and less than 0 days (expired) etc.
Any assistance would be greatly appreciated.
-
On which db system? T-sql should like:
select count(*) from tab where DateDiff(d, AccredExpiryDate, getDate()) < ...
-
My apologies for not including the database type. It is actually MS Access. I have since come up with a workable solution using the DCount() function within my form and report.
Thanks for getting back to me. Much appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|