Brian Dunning's FileMaker Custom Functions

moment.fm ( dateTimeStamp ; formatString ; relativeDte )

display date and time as string using tokens, similar to moment.js

  Be the first to rate this function Log in to vote

David Schellenberg   David Schellenberg - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
moment.fm ( Get(CurrentTimeStamp) ; "dddd, MMMM Do YYYY, h:mm:ss a" ; false )
moment.fm ( Get(CurrentTimeStamp) ; "ddd, hA" ; false )

moment.fm ( Get ( CurrentDate ) + 4 ; "MMM do YYYY" ; True )
moment.fm ( Get ( CurrentDate ) + 12 ; "MMM do YYYY" ; True )
  Sample output:
moment.fm ( Get(CurrentTimeStamp) ; "dddd, MMMM Do YYYY, h:mm:ss a" ; false )
// => "Sunday, October 17th 2021, 11:46:56 am"


moment.fm ( Get(CurrentTimeStamp) ; "ddd, hA" ; false )
// => "Sun, 11AM"


moment.fm ( Get ( CurrentDate ) + 4 ; "MMM do YYYY" ; True ) //relative date
// => "Thursday"


moment.fm ( Get ( CurrentDate ) + 12 ; "MMM do YYYY" ; True ) //relative date
// => "Oct 6th 2021"

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

reformat timestamp using tokens, similar to moment. js

 

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: