Brian Dunning's FileMaker Custom Functions

DateDelim

reformats any date into a US formatted date with a specified delimiter. Gives 2 digits for month/day and a choice of 2 or 4 digits for the year.

  Be the first to rate this function Log in to vote

Eddie Albert   Eddie Albert - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
DateDelim("1/8/18";".";2)
  Sample output:
01.08.18

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

Reformats any date into a US formatted date with a specified delimiter. Gives 2 digits for month/day and a choice of 2 or 4 digits for the year.

Useful for adding dates to exported file names using a period ur underscore to separate the month/day/year

Examples:
DateDelim("1/1/18";"_";2) = 01_01_18
DateDelim("1/1/18";".";4) = 01.01.2018
DateDelim("1/1/18";"/";2) = 01/01/18

 

Comments

De So   De So
Jan 2, 2019
It appears that for the month and day to be 2-digit long, the expression should be "<=9" or "<10" and not "<9" as stated in the Let function. Otherwise, September or the 9th of any month would still render as a one-digit month or day.
 
Eddie Albert   Eddie Albert
Jan 15, 2019
Thank you De So. You are correct. It has been fixed.
 

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: