Brian Dunning's FileMaker Custom Functions

YMDFormat ( theDate )

Reformats a given date into text as YYYY-MM-DD

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

David Goetzka   David Goetzka - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
YMDFormat( 1/1/1986 )
  Sample output:

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

This is my first shot at a custom function, so don't laugh. ;-) I basically needed to reformat a date in the format of YYYY-MM-DD to send as a text string.



Peter Bouma   Peter Bouma, Amsterdam, Netherlands
Jan 27, 2010
Instead of Case statements I'd prefer:

Year(theDate) & "-" &
Right("00" & Month(theDate); 2) & "-" &
Right("00" & Day(theDate); 2)
John Pollard   John Pollard, sac, ca
Jun 9, 2016
Nice clarification there. Started with a good idea made better.

Log in to post comments.


Note: these functions are not guaranteed or supported by 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 16 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: