Decimal()

Format

Decimal(Arg1)

Returns

Converts the supplied argument into a Decimal data type.

Inputs

Arg1: The argument to be converted.
Behaviour: Required
Dimension: Collection, SingleValue, MultiCollection
Valid data types: Boolean, DateTime, Decimal, Integer, String, Duration

How to format data types

Examples

Expression: Decimal(True)
Result: Returns the Boolean value of True as a Decimal value. True=1.0, False=0.0
E.g. 1.0

Expression: Decimal(12.2)
Result: Returns the decimal value of 12.2 as a Decimal value.
E.g. 12.2

Expression: Decimal(12)
Result: Returns the integer value of 12 as a Decimal value.
E.g. 12.0

Expression: Decimal("12.2")
Result: Returns the string value of "12.2" as a Decimal value.
E.g. 12.2

Expression: Decimal({utc'2017-01-18 14:32'})
Result: Returns the returns the number of seconds since Unix epoch.
E.g. 1484749920.0

Expression: Decimal({du'-01:02:03.456'})
Result: Returns the the number of seconds of the duration.
E.g. -3723.456 

Release History

  • Decimal() 4.6.5
    • Changed Arg1 parameter to support MultiCollection values.
  • Decimal() 4.0
    • Initial version

Comments are closed