WeekDayCountInMonth ( countThisWeekDayNum, dateInMonth )
Returns the number of times a given weekday number appears in the month of the specified date.
Average rating: 4.5 (19 votes) Log in to vote
Daniel A. Shockley New York Hotel Trades Council http://hotelworkers.org |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
It can be useful to know things like "How many Thursdays are there in the calendar month August 2015?" This function allows you to answer that question easily. It's a simple algorithm I found on a page about Excel function somewhere.
You send in the week-day-number (i.e. 4, if you want to count Thursdays), along with some date (any date!) within the calendar month you want to check.
Another example, to find the number of today's day-of-week in today's month, would be:
WeekDayCountInMonth (
DayOfWeek ( Get ( CurrentDate ) )
; Get ( CurrentDate )
)
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.