Brian Dunning's FileMaker Custom Functions

TimeFilter ( txt ; i )

Shorten all the times in a textfield to (n)n:nn format

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

Menno van Beek   Menno van Beek - Show more from this author
Van Beek Zakelijke Software
https://www.vbzs.nl

Share on Facebook Share on Twitter

  Sample input:
TimeFilter (
Peter 12-21-2013 5:30:05 AM - 09:10:29 PM
Claus 12-22-2013 8:45:23 PM - 09:11:11 PM
Jacob 12-23-2013 7:30:42 AM - 11:15:38 AM ; "" )
  Sample output:
Peter 12-21-2013 5:30 AM - 09:10 PM
Claus 12-22-2013 8:45 PM - 09:11 PM
Jacob 12-23-2013 7:30 AM - 11:15 AM

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

If you have a timetable extracted from a database with some SQL or List(), then useually the times contain the seconds, which are often not significant. This function simply searches the text for the pattern (n)n:nn:nn and if found converts that into (n)n:nn simply by cutting of the last 3 characters.
AM/PM doesn't disturb the function and is disregarded as long as there's a space between it and the seconds.

 

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 15 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: