Given day, return date?

A

Apple

Hi All,

Is that possible, if I give an entry first Monday of December, it returns
what is the date...entry third Friday of November, return what is the date,
pls help. Thanks a lot everyone!

Rgrds,
Apple
 
K

Ken Snell [MVP]

Here is an expression that I provided to a poster about 5 months ago for
doing something similar.

MeetingDate: DateSerial([MeetingYear], [MeetingMonth], 8 - DatePart("w",
DateSerial([MeetingYear], [MeetingMonth], 1), 1 + [MeetingWeekDay] Mod 7) +
([MeetingWeekNum] - 1) * 7)

In this case, you would provide the year (MeetingYear); month as a number
(MeetingMonth); day of the week as a number, where 1 is Sunday, 2 is Monday,
etc. (MeetingWeekDay); and the week number such as 1 for the first day
(i.e., the first Monday if you gave weekday as 2) (MeetingWeekNum).

The expression returns to you the specific date that meets what you entered.

For example, if you wanted the second Thursday of July 2004, you'd enter:
2004 for MeetingYear
7 for MeetingMonth
5 for MeetingWeekDay
2 for MeetingWeekNum
 
Top