Number.From

Last updated 5 months ago

Number.From

Creates a number from the given value.

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

Description

Returns a number value from the given value. If the given value is null, Number.From returns null. If the given value is number, value is returned. Values of the following types can be converted to a number value:

If value is of any other type, an error is returned.

Category

Number.Conversion and formatting

Examples

Get the number value of "4".

Number.From("4")

4

Get the number value of #datetime(2020, 3, 20, 6, 0, 0).

Number.From(#datetime(2020, 3, 20, 6, 0, 0))

43910.25

Get the number value of "12.3%".

Number.From("12.3%")

0.123