Brian Dunning's FileMaker Custom Functions

DateStamp

Used to quickly add datestamp info to things like exported file names

  Be the first to rate this function Log in to vote

Dwayne Wright   Dwayne Wright - Show more from this author
Dwayne Wright
http://thepracticalba.com

Share on Facebook Share on Twitter

  Sample input:
n/a
  Sample output:
Mar_13_2020

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

Sometimes, you just want to use a custom function as a form of short hand. A very common use case is that FileMaker desktop or FileMaker Server needs to output a data file and one of the requirements is to include a date stamp in the file name. In some work environments, this could be a business rule. I have FileMaker Server doing a number of ETL tasks and got tired of manually coding the datestamp info again and again and again.

So when you setup your variable for where you want FileMaker to store the file, you can quickly add something like "file:weekReport_" & DateStamp & ".csv"

The next local step could be to edit this function so the primary fileName would be a function parameter as well. Perhaps passed to it by a script parameter. Again, not a big thinker custom function.

 

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: