Currency.From
Returns a currency value from the given value.
function (optionalvalue
as nullable any, optionalculture
as nullable any, optionalroundingMode
as nullable any) as nullable any
Returns a
currency
value from the given value
. If the given value
is null
, Currency.From
returns null
. If the given value
is number
within the range of currency, fractional part of the value
is rounded to 4 decimal digits and returned. If the given value
is of any other type, see Number.FromText
for converting it to number
value, then the previous statement about converting number
value to currency
value applies. Valid range for currency is -922,337,203,685,477.5808
to 922,337,203,685,477.5807
. See Number.Round
for the available rounding modes, the default is RoundingMode.ToEven
.Number.Conversion and formatting
Get the
currency
value of "1.23455"
.Currency.From("1.23455")
1.2346
Get the
currency
value of "1.23455"
using RoundingMode.Down
.Currency.From("1.23455", "en-Us", RoundingMode.Down)
1.2345
Last modified 4yr ago