数据流表达式语言以双倍小数部分 [英] Dataflow expression language toDouble dropping decimal portions

查看:73
本文介绍了数据流表达式语言以双倍小数部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我输入的数据来自西班牙语源,小数点是逗号(,)。 


我使用这个表达式来导出数值来自数据流派生列转换中的字符串:


toDouble(VALOR_CONTABLE_NETO,'#。00','es-ES')


我'我为格式字符串和区域设置字符串尝试了许多不同的值。 


结果值无法识别字符串中的小数部分。 



也许我没有正确获取语言环境字符串。当我在格式字符串中使用逗号时,结果是100x太大(它忽略了逗号)。


toDouble(VALOR_CONTABLE_NETO,'#,##','es-ES' )



我想我可以做一个解决方法并除以100,但我想知道我在做什么,它不像我期望的那样表现。


Mike



解决方案

你能试试吗?


toDouble VALOR_CONTABLE_NETO
'###,##' 'ES'

I have input data coming from a Spanish source, and the decimal marker is a comma (,). 

I am using this expression to derive the numeric value from the string in a dataflow derived column transformation:

toDouble(VALOR_CONTABLE_NETO,'#.00','es-ES')

I've tried a bunch of different values for the format string and for the locale string. 

The result values aren't recognizing the decimal portion after the , in the string. 

Perhaps I am not getting the locale string correctly. When I use the comma in the format string, the results are 100x too large (it's ignoring the comma).

toDouble(VALOR_CONTABLE_NETO,'#,##','es-ES')

I guess I can do a workaround and divide by 100, but I'm wondering what I'm doing that it's not behaving as I'm expecting.

Mike

解决方案

Can you try this?

toDouble(VALOR_CONTABLE_NETO, '###,##', 'ES')


这篇关于数据流表达式语言以双倍小数部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆