Brian Dunning's FileMaker Custom Functions

DecimalToHrMin ( aNumber )

This CF will return a decimal value in a format of hour and minutes

  Average rating: 4.4 (36 votes) Log in to vote

Andy Knasinski   Andy Knasinski
NRG Software, LLC.
http://www.nrgsoft.com

Share on Facebook Share on Twitter

  Sample input:
DecimalToHrMin ( 1.5 )
  Sample output:
1 Hr 30 Min

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

This CF will return a decimal value in a format of hour and minutes


Examples:
DecimalToHrMin ( 1.5 ) will return "1 Hr 30 Min"
DecimalToHrMin ( .25 ) will return "15 Min"

 

Comments

comment   comment, VR
Feb 10, 2011
How about something simple?

Let ( [
t = decimalHours * 3600 ;
h = Hour ( t ) ;
m = Minute ( t )
] ;
Case ( h ; h & " Hr " ) & Case ( m ; m & " min" )
)
 

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: