Brian Dunning's FileMaker Custom Functions

WeekOfMonth ( _date ; startingDay )

Returns a number between 1 and 6 representing the week containing date

  Average rating: 4.2 (40 votes) Log in to vote

Daniele Raybaudi   Daniele Raybaudi
ACI
http://www.aci.it

Share on Facebook Share on Twitter

  Sample input:
WeekOfMonth ( "06/07/2009" ; 1 )

WeekOfMonth ( "06/07/2009" ; 2 )
  Sample output:
2

1

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

WeekOfMonth ( _date ; startingDay ) custom function ( not recursive)

Author:
Daniele Raybaudi

Parameters:
_date - any calendar date
startingDay - any number between 1 and 7, where 1 represents Sunday

Data type returned:
number

Description:
Returns a number between 1 and 6 representing the week containing date, figured according to startingDay. startingDay indicates which day is considered the first day of the week.

 

Comments

Log in to post comments.

 

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

Under construction. Email me your wish list for improvements.