Brian Dunning's FileMaker Custom Functions

OneDayBack ( input )

find latest non weekend date before input date

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

Darrin Morton   Darrin Morton
Neocode Software

Share on Facebook Share on Twitter

  Sample input:
  Sample output:

  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



Daniele Raybaudi   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   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   Daniele Raybaudi, ACI
Aug 3, 2013
Another formula, same result:

input - 1 - Choose ( DayOfWeek ( input ) - 1 ; 1 ; 2 )

Log in to post comments.


Note: these functions are not guaranteed or supported by 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 15 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:

Under construction. Email me your wish list for improvements.