Personnel leaving in 30 days and also 7 days

C

Cramer,Samuel USN

I am trying to create a function that will sort all the people that will be
leaving with in 30 days from todays date and I will also be needed one for
people leaving in a week time frame. I have tried using >Date()-30 but it
shows a person that has already left 3 days prior to todays date. Can somone
help me out with a function
 
J

Jeff Boyce

I assume you are referring to an expression in a query, given where you
posted and your description.

You didn't describe what your underlying data is -- and it all starts with
the data!

I'll also assume you have a LeavingDate field which is a date/time datatype
field.

If I wanted to find records where LeavingDate is less than or equal to 30
days from today, I might try something like (untested):
=Date() And <=Date()+30

(again with the assumptions, already! -- I don't want LeavingDates already
passed)

I would think the "week" would translate to a "7" for the expression (again,
untested).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
C

Cramer,Samuel USN

That is exactly what I needed thank you.

/r,
Samuel Cramer
Machinist Mate First Class
US Navy
 
Top