Brian Dunning's FileMaker Custom Functions

GetRelativeDate ( ~input )

Get the appropriate date for day names like today, yesterday, after tomorrow, …

  Be the first to rate this function Log in to vote

Udo Bösch   Udo Bösch - Show more from this author
Udo R. Bösch mipiano apps
http://mipiano.de

Share on Facebook Share on Twitter

  Sample input:
GetRelativeDate ( "t" )
GetRelativeDate ( "today" )
GetRelativeDate ( "tom" )
GetRelativeDate ( "tomorrow" )
  Sample output:
9/19/2022
9/19/2022
9/20/2022
9/20/2022

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

This custom function contains the relative day names in five languages: English, German, French, Spanish and Italian. English is the default. However, if the system language is one of the other four languages, the appropriate terms are used.

You can type the day names completely or only partially. You can type "today" or only "t" to get today's date. "tom" or "tomorrow" will find tomorrow's date. "b" or "by" or "before yesterday" finds the date of the day before yesterday, "a" or "at" or "aft" or "after tomorrow" finds the date of the day after tomorrow.

Use the function as an auto-enter calculation in a text field or use it in an OnObjectValidate trigger script to simplify date entry into a date field.

 

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: