query on dates

K

Kim T

I want to compare DateReleased to DateNextAppt (both are date fields) then I
need to get => 15 days. Please help me
KT
 
J

Jeff Boyce

Kim

See Access HELP for the DateDiff() function, which you can use in a query to
subtract two dates. You could even use something like:

[DateNextAppt] - [DateReleased]

to create a new field in your query, and use:

=> 15

in the selection criterion.

Regards

Jeff Boyce
Micosoft Office/Access MVP
 
O

Ofer Cohen

You can use the DateDiff function to get the different between the two dates,
and then add the criteria

Select * From TableName
Where DateDiff("d",DateReleased , DateNextAppt ) >= 15
 
Top