Brian Dunning's FileMaker Custom Functions

FormatTimestamp.YMD_HMS ( ~timestamp )

Convert a given timestamp to specific format: YearMonthDay_HourMinuteSecond

  Be the first to rate this function Log in to vote

Thomas DS   Thomas DS - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
FormatTimestamp.YMD_HMS ( "02/01/1970 12:11:10" ) // here in MM/DD/YYYY format
  Sample output:
19700201_121110

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

The result's format is export friendly and is chronologically sortable.

This example assumes that the operating system date format is set to MM/DD/YYYY.
Note that it will also work with other formats.

It is of course possible to combine this custom function with other functions, for example:
CF_formatTimestamp.YMD_HMS ( Get ( CurrentHostTimestamp ) )

 

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: