Percentage.From

Last updated 5 months ago

Percentage.From

Returns a percentage value from the given value.

function (optional value as nullable any, optional culture as nullable any) as nullable any

Description

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, see Number.From for converting it to number value.

Category

Number.Conversion and formatting

Examples

Get the percentage value of "12.3%".

Percentage.From("12.3%")

0.123