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 - Show more from this author
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.

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: