Brian Dunning's FileMaker Custom Functions

NextDayNameDate ( theDate ; theDayName )

returns the date with the first occurrence of theDayName from the given theDate

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

Daniele Raybaudi   Daniele Raybaudi
ACI
http://www.aci.it

Share on Facebook Share on Twitter

  Sample input:
NextDayNameDate ( theDate; "Monday" )
  Sample output:
09/26/2005
if theDate is 09/25/2005

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

returns the date with the first occurrence of theDayName from the given theDate;
if the given theDayName is the name of the day of the given theDate, it returns theDate.
So, if we wish to know what is the date of the next Monday from theDate 09/26/2005 we can write:
Case(
theDate = "";"";
NextDayNameDate ( theDate; "Monday" ) = theDate ; NextDayNameDate ( theDay; "Monday" ) + 7;
NextDayNameDate ( theDay; "Monday" )
)
and it returns: 10/03/2005

 

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.

Under construction. Email me your wish list for improvements.