Counts the number of times a repeating event will occur between two dates.
Sample Input:
CountEvents ( "1/1/2007" ; "6/1/2007" ; "Once" ; "5/14/1976" ) // Returns 0
CountEvents ( "1/1/2007" ; "6/1/2007" ; "Once" ; "5/14/2007" ) // Returns 1
CountEvents ( "1/1/2007" ; "6/1/2008" ; "Yearly" ; "5/14" ) // Returns 2
CountEvents ( "1/1/2007" ; "6/1/2007" ; "Monthly" ; "1" ) // Returns 6
CountEvents ( "1/1/2007" ; "6/1/2007" ; "Monthly" ; "15" ) // Returns 5
CountEvents ( "1/1/2007" ; "6/1/2007" ; "Monthly" ; "0" ) // Returns 5 (0 represents the last day of the month, -1 would represent the second to last day of the month, etc.)
CountEvents ( "1/1/2007" ; "1/6/2007" ; "Weekly" ; "Monday" ) // Returns 1
Sample Output:
Count the number of times a repeating event will occur between two dates.
Description:
NAME
EventCount
DESCRIPTION
Count the number of times a repeating event will occur between two dates.
PARAMETERS
DateBegin: The start date of the range to be checked.
DateEnd: The stop date of the range to be checked.
Frequency: Text describing the length of the repetition. Supported values are Once, Yearly, Monthly, Weekly, and Daily.
When: Text representing the point in the frequency arc when the event hits. The expected format depends on the type of frequency specified.
Note: these functions are not guaranteed
or supported by BrianDunning.com. Please contact the individual
developer with any questions or problems.
Free pop-up calendar for your FileMaker solution. Click
here.
Custom Function Authors:
Link to all of your own custom functions on this site with the following URL:
http://www.briandunning.com/filemaker-custom-functions/results.php?author=Your
Name Here