Maths functions

FRACTODEC – Convert fraction to decimal

62 views June 1, 2018 admin 1

Overview

This Custom Field converts a string containing a fraction into a decimal value. The command requires two parameters: the string containing the fraction to convert and the number of decimal places to be which the converted figure will be displayed.

Syntax

FRACTODEC(String,Precision)

 

Element Description
String A string in a field displayed as a fraction.
Precision The number of decimal places in the converted number.

Examples

FRACTODEC(FIELDSTR(size),2) will return a list of values from a ‘size’ field, displayed to two decimal places.

FRACTODEC(‘1/2’,2) will return 0.50.

FRACTODEC(‘3/8’,3) will return 0.375.

FRACTODEC(‘3/8’,2) will return 0.38.

FRACTODEC(‘3/8’,1) will return 0.4.

See also

DECTOFRAC

 

Was this helpful?