3 Months from January of this year

G

Guest

I'm trying to format a query to determine if the hire date of an employee is
within 3 months before January of the current year. Here is what I have so
far and it's not working, can someone please help?

Flag: ([Staff]![DateHired])-Format(("1/1/" &
Format(Now(),"yyyy")),"m","dd",Now())
 
A

Amy Blankenship

TimT said:
I'm trying to format a query to determine if the hire date of an employee
is
within 3 months before January of the current year. Here is what I have so
far and it's not working, can someone please help?

Flag: ([Staff]![DateHired])-Format(("1/1/" &
Format(Now(),"yyyy")),"m","dd",Now())

Try using DateDiff.

HTH;

Amy
 
K

Ken Snell \(MVP\)

Assuming that the flag should be True or False (True if the hire date with
between October 1 and December 31 of the previous year):

Flag: (Staff.DateHired Between DateSerial(Year(Date())-1,10,1) And
DateSerial(Year(Date())-1,12,31)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top