Create Due Date

R

rdwest01

I have a query that tracks the date a person takes a courses. The next time
the person is due to take a course in some cases is the last day of the next
year. ie if the person take the course 02 Mar 05 he/she is due on the 31 Dec
06. Regardless of when the course is taken in 2005, he/she will be due on
the 31 Dec 06. I currently use:

CPR-C Due Date: 365+[CPR-C Date]

which on course isn't accurate. Hope you can help out.
 
M

[MVP] S.Clark

I would associate to each training class what the month and day is for the
next requirement. Year can be determined on the fly.

Then use that in the equation to specify the next due date.

See DateSerial() in the help file, too.
 
J

John Vinson

I have a query that tracks the date a person takes a courses. The next time
the person is due to take a course in some cases is the last day of the next
year. ie if the person take the course 02 Mar 05 he/she is due on the 31 Dec
06. Regardless of when the course is taken in 2005, he/she will be due on
the 31 Dec 06. I currently use:

CPR-C Due Date: 365+[CPR-C Date]

Use instead:

CPR-C Due Date: DateSerial(Year([CPR-C Date]) + 2, 1, 0)

That will be the "zeroth day" of year after next - which DateSerial is
clever enough to convert to the last day of the next year.

John W. Vinson[MVP]
 
Top