暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

hive-函数format_number

趣说大数据 2021-11-25
3969
01

函数简介


format_number(number x, int d)
Formats the number X to a format like '#,###,###.##', rounded to D decimal places, and returns the result as a string. If D is 0, 
the result has no decimal point or fractional part.


02

用途1 格式化金额字段


数据格式化,将金额100000 格式化成100,000.00 的样式输出
select format_number(100000,2)
输出结果:
10,000.00

文章转载自趣说大数据,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论