Brian Dunning's FileMaker Custom Functions

WeekdaysDiff ( startDate ; endDate ; format )

Returns the total number of weekdays (Monday to Friday) between the specified dates in the specified format.

  Average rating: 4.3 (31 votes) Log in to vote

Kurt Otto   Kurt Otto - Show more from this author
ottopiaDESIGN
http://ottopia.dyndns.org/

Share on Facebook Share on Twitter

  Sample input:
WeekdaysDiff ( "10/4/2005" ; "27/9/2005" ; 0 )

WeekdaysDiff ( "10/4/2005" ; "27/9/2005" ; 1 )
  Sample output:
5

-5

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

Format
------
WeekdaysDiff ( startDate ; endDate ; format )

Parameters
----------
startDate - any date expression or field containing a date.
endDate - any date expression or field containing a date.
format - a number (0 or 1) that describes the display format

Data type returned
----------------
number

Description
----------
Returns the total number of weekdays (Monday to Friday) between the specified dates in the specified format.

0 - returns the absolute difference between the two dates.
1 - returns a negative value if the specifed end date occurs before the specified start date.

Examples
--------
This example assumes that the system date format is DD/MM/YYYY.

WeekdaysDiff ( "10/4/2005" ; "27/9/2005" ; 0 ) returns 5
WeekdaysDiff ( "10/4/2005" ; "27/9/2005" ; 1 ) returns -5

 

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 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: