Percentage.From
Returns a percentage value from the given value.
Syntax
Percentage.From(
value as any,
optional culture as text
) as number
Remarks
Returns a percentage value from the given value. If the given value is null, Percentage.From returns null. If the given value is text with a trailing percent symbol, then the converted decimal number will be returned. Otherwise, the value will be converted to a number using Number.From. An optional culture may also be provided (for example, "en-US").
Examples
Example #1
Get the <code>percentage</code> value of <code>"12.3%"</code>.
Percentage.From("12.3%")
Result:
0.123
Category
Number.Conversion and formatting