Brian Dunning's FileMaker Custom Functions

IsTime ( _var )

return valid time as number of seconds or nothing if invalid

  Average rating: 4.8 (23 votes) Log in to vote

Rewolfer   Rewolfer - Show more from this author
http://rewolfer.de

Share on Facebook Share on Twitter

  Sample input:
IsTime ( "1:0:1" )
  Sample output:
3601

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

/*=================================================

FORM: IsTime ( _var )

PURPOSE: return valid time as number of seconds or nothing if invalid

PARAMETER: _var format: unknown value: variable

RESULT: number of seconds or NOTHING if invalid

DEPENDENCY: -

NOTE: for boolean result check with IsEmpty ( IsTime ( _var )) instead of GetAsBoolean ( IsTime ( _var )) since IsTime ("0:0") is valid
see my other function IsTimeOfDay( _var )

EXAMPLE: IsTime ( "1:0:1" ) => 3601
IsTime ( "122330" ) => ""
IsTime ( "1:71:71" ) => 7931 (valid FMP-time!)

DEVELOPER: tsw @ http://rewolfer.de

=================================================*/

 

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:

Under construction. Email me your wish list for improvements.