Question on Dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Quick question. How would you get a query to return an evaluation date when the evaluation date is always their hire date but in that current year? Say they were hired on 2/22/02, their evaluation date is always going to be 2/22 of the current year. I tried using a DateSerial and setting the Year to equal Now(), but that didn't work, it gave me the year 2000 for everyone. Maybe I'm looking at it wrong and only need to be looking at the month portion. I just want to be able to tell who is coming due for an evaluation.

Also, I have a table that tracks employees training and a form to enter this data. On the form I have a field that automatically calculates the Expiration Date. Is there any way to be able to copy that data to the table?? On the form I have the formula in the control field.
 
DateSerial(Year(Date()), Month(HireDate),Day(HireDate))

--
Duane Hookom
MS Access MVP


Shanin said:
Quick question. How would you get a query to return an evaluation date
when the evaluation date is always their hire date but in that current year?
Say they were hired on 2/22/02, their evaluation date is always going to be
2/22 of the current year. I tried using a DateSerial and setting the Year
to equal Now(), but that didn't work, it gave me the year 2000 for everyone.
Maybe I'm looking at it wrong and only need to be looking at the month
portion. I just want to be able to tell who is coming due for an
evaluation.
Also, I have a table that tracks employees training and a form to enter
this data. On the form I have a field that automatically calculates the
Expiration Date. Is there any way to be able to copy that data to the
table?? On the form I have the formula in the control field.
 
DateSerial(Year(Date()),Month(HireDate),Day(HireDate)) will return the date in
the current year.

Field: EvalDate: DateSerial(Year(Date()),Month(HireDate),Day(HireDate))
Criteria: Between Date() and DateAdd("d",10,Date())

That should get you everyone from the current date to current date plus 10 days.
It will have some problems in December, in that it will fail to get people due
review in the first 10 days of January, until you get to January 1.
 
Back
Top