Brian Dunning's FileMaker Custom Functions

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   Daniel A. Shockley
New York Hotel Trades Council

Share on Facebook Share on Twitter

  Sample input:
WeekDayCountInMonth ( 4, Date ( 8; 12; 2015 ) )
  Sample output:

  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 )



Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: