Brian Dunning's FileMaker Custom Functions

DecimalToFraction ( number )

convert decimal numbers to fractions

  Average rating: 4.1 (34 votes) Log in to vote

Michael Myett   Michael Myett - Show more from this author
FileMaker Apps

Share on Facebook Share on Twitter

  Sample input:
DecimalToFraction ( 5.75 )
  Sample output:
5 3/4

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

Since there are not any native conversion functions for decimals to fractions in FileMaker, variations of this lengthy calculation have been used for as long as FileMaker itself.

With custom functions, we can turn this mess into a simple one variable function.

An example might be an auto-enter calculation in the quantity field of a recipe database.

 

Comments

Denise   Denise, Boston
Jun 13, 2010
Thanks! Exactly what I'm looking for.
 
Kay Fenlason   Kay Fenlason
Feb 25, 2023
This does not quite work for a recipe database, I have never used .7 cups of sugar!
 

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: