Brian Dunning's FileMaker Custom Functions

timeFormat ( thetime ; leader )

Formats lots of shorthand text strings as time

  Average rating: 3.9 (43 votes) Log in to vote

Bob Patin   Bob Patin
Longterm Solutions LLC
http://www.longtermsolutions.com

Share on Facebook Share on Twitter

  Sample input:
timeFormat("1p" ; 1 )
timeFormat("123" ; 0 )
timeFormat("4p" ; 0 )
timeFormat("3" ; 1 )
timeFormat("3" ; 0 )
  Sample output:
01:00 PM
1:23 AM
4:00 PM
03:00 AM
3:00 AM

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

timeFormat will take various text input and format it as time. For example, you can enter any of these: 1, 1a, 9p, 1230, 1230p, 125a, 125p.

Error-checking will reject any extraneous characters and show an error message for input that can't be interpreted as time.

 

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: