Filtering Dates

Locomotive

Registered User.
Local time
Today, 21:49
Joined
Mar 12, 2003
Messages
16
In my drivers database I need to show drivers between age 25-35: I put this in criteria:

<Date()-9125
>Date()-12775

(12775 days= 35 years, 9125 days= 25 years)

what is the correct way to do this filter?
 
Try this setting in a column in the query grid, using the correct field name of date of birth:-


Field: Age: DateDiff("yyyy",[DateOfBirth],Date())+(Date()<DateSerial(Year(Date()),Month([DateOfBirth]),Day([DateOfBirth])))

Show: check
Criteria: Between 25 and 35
 

Users who are viewing this thread

Back
Top Bottom