Brian Dunning's FileMaker Custom Functions

ConditDateRange ( StartDate ; EndDate ; Weekend )

Date range that may include weekends or not.

  Average rating: 4.4 (34 votes) Log in to vote

Miguel Angel   Miguel Angel

Share on Facebook Share on Twitter

  Sample input:
ConditDateRange ( "03/09/2005" ; "12/09/2005" ; 0)
  Sample output:
05/09/2005
06/09/2005
07/09/2005
08/09/2005
09/09/2005
12/09/2005
----------
03/09/2005
04/09/2005
05/09/2005
06/09/2005
07/09/2005
08/09/2005
09/09/2005
10/09/2005
11/09/2005
12/09/2005(This result if the Weekend value is 1)

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

This custom function will return a list of dates from StartDate to EndDate. The Weekend parameter allows two values: 0 to omit weekends or 1 to include them.

 

Comments

PeterWindle   PeterWindle, Sydney
Aug 15, 2012
You're a god.

I love this so much. I have been struggling with a way to count the number of work days. This custom function, combined with value count works a treat.
 
Miguel Angel   Miguel Angel
Aug 18, 2012
Thank you so much for your comment Peter.
Glad to see this custom funcion has been helpful for you.
Kind regards,
Miguel
 
Dave Hobson   Dave Hobson, Bristol, UK
Dec 9, 2015
Miguel - that's very helpful! Thanks for sharing it.

Dave.
 
Miguel   Miguel, León / Spain
Feb 22, 2016
You are welcome Dave,
Nice to see this function has been helpful once more.
Kind regards,
Miguel
 

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.