OneDayBack ( input )
find latest non weekend date before input date
Average rating: 4.3 (28 votes) Log in to vote
Darrin Morton Neocode Software http://www.neocodesoftware.com |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Finds the most previous non-weekend date to input date. For example:
1. Given input date of Wed Jul 24, 2013 will return Tue Jul 23, 2013.
2. Given input date of Monday Jul 29, 2013 will return date of Fri Jul 26, 2013
Comments
Daniele Raybaudi, ACI Aug 2, 2013 |
||
You do not need $ variables and it's better to not use them in this case. Try: Case ( DayOfWeek ( input ) = 2 ; date - 3 ; DayOfWeek ( input ) = 1 ; date - 2 ; date - 1 ) |
||
Darrin Morton, Victoria, BC Aug 2, 2013 |
||
once again daniele is right, with a minor tweak, i have revised to correct, works great | ||
Daniele Raybaudi, ACI Aug 3, 2013 |
||
Another formula, same result: input - 1 - Choose ( DayOfWeek ( input ) - 1 ; 1 ; 2 ) |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.