根据参数值的类型,将其转换为小数值。
转化
toDecimal(<parameter>)
参数 | 描述 |
---|---|
字符串 | 将字符串值转换为小数 |
dateTime | 将日期转换为毫秒数(纪元毫秒) |
布尔 | 将布尔值转换为1(如果为true),0(如果为false) |
整数 | 转换为小数(示例)。:1变为1.0) |
toDecimal(<integer>)
toDecimal(<decimal>)
toDecimal(<string>)
toDecimal(<boolean>)
返回小数。
toDecimal("4.0")
返回4.0。