Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
Training
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


Privacy Policy



FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

 

 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

CF.TextToTime ( TXT ; F ; L )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 4.3  (22 votes)
  Discuss this Custom Function

Thomas Hellwig, Delasocial GmbH, Hamburg (Germany)
http://www.delasocial.com

Coverts the first 3 up to 7 numbers of a text string into a time indication (hours, minutes, seconds).

Sample Input:
CF.TextToTime ( "ABC250761" ; 1 ; 0)
CF.TextToTime ( "milliseconds0155900" ; 3 ; 3 )
CF.TextToTime ( "61594" ; 2 ; 0 )
Sample Output:
25:08:01
01:55:900
01:59


 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

Description:

Description:
Coverts the first 3, 4, 5, 6, or 7 numbers of a text string into a time indication (like hours:minutes or hours:minutes:seconds or minutes:seconds:milliseconds).

Version:
2.0: Completely revised code.
3.0: New Format "mm:ss" as code 2 and "ss:ms" as code 4. Additional parameter (L) for the numbers of digits of milliseconds.
3.1: Bugfix

Parameters:
(TXT) Possible values:
A text string with numbers ---> e.g. "Your time is 8 min and 23 sec." or "12445" or "089 hu!77-3p"

(F) Possible values:
Output format code:
0 ---> without seconds (hh:mm)
1 ---> with seconds (hh:mm:ss)
2 ---> without hours (mm:ss)
3 ---> without hours, but with milliseconds (mm:ss:ms)
4 ---> without hours and minutes (ss:ms)

(L) Lenght of millisecongs (number of digits):
0 ---> if not needed
1 ---> 1 digit
2 ---> 2 digits
3 ---> 3 digits

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it

Discuss:

Your custom function is stumbling on “SetzeVars” as if I’m supposed to have a CF with that name, or the English version of what that does.

Lee Smith, Woodland California
March 10, 2016 1:16pm

Please note that the FileMaker version is 12. The function "SetzeVars" is renamed in version 13.
I hope this information is helping you.

Thomas Hellwig, Hamburg/Germany
March 10, 2016 1:37pm

I guess I’m fighting more than one issue, the version I’m using is 14 and the Calc is in German which I don’t know the the equivalent of English from German.

Lee Smith, Woodland California
March 10, 2016 1:45pm

You can use the tool "Language Switcher" to start FileMaker in german. But the code above will be also switched automatically if you copy it into the Specify Calculation.

Here it is in english:

Let (
[
FZS = Filter ( TXT ; "0123456789" ) ;
AZ = Case ( Length ( FZS ) = 1 ; GetAsText ( "0" & FZS ) ; FZS ) ;
P = Left ( GetAsText ( AZ & "000000" ) ; 6 ) ;
SEC = Case ( M = 1 ; 8 ; 5 ) ;
Z = Left ( Time ( Left ( P ; 2 ) ; Middle ( P ; 3 ; 2 ) ; Right ( P ; 2 ) ) ; SEC )
]

; //______________________________ Calculation

Z

) //___ EndLet

Thomas Hellwig, Hamburg/Germany
March 11, 2016 10:59am

Version 2.0 has a complete new structure and is reduced to three codes for three output formats:
0 ---> without seconds (hh:mm)
1 ---> with seconds (hh:mm:ss)
2 ---> without hours, but with milliseconds (mm:ss:ms )

Thomas Hellwig, Hamburg/Germany
April 02, 2016 2:35pm

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
City/Location:
Comment:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 1 + 1 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. decFromHex ( hexValue )
  (Mon, Oct 16, 12:34pm)
2. MonthYearList ( startmonth ; startyear ; numbermonth ; short )
  (Mon, Oct 16, 3:38am)
3. ErrorDescription ( errorNumber )
  (Wed, Sep 27, 2:51am)
4. decodeEntities (text)
  (Wed, Sep 27, 1:22am)
5. HexidecimalToNumber ( HexidecimalValue ; counter )
  (Mon, Sep 25, 12:39pm)
6. FixedFieldConverter ( Fieldname ; f1 ; f2 ; f3 ; f4 ; f5 ; f6 ; f7 ; f8 ; f9 ; f10 ; f11 ; f12 ; f13 ; f14 ; f15 ; f16 ; f17 ; f18 ; f1
  (Fri, Sep 15, 12:34pm)
7. ShannonEntropy ( text )
  (Thu, Sep 07, 5:59am)
8. LetterCount ( text ; summary )
  (Thu, Sep 07, 5:53am)

RSS Feed of Custom Functions