如何转换货币格式。 [英] how to convert the format of currency.

查看:84
本文介绍了如何转换货币格式。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将货币存储在仅1800的数据库列中。现在我想在数据库的标签中显示它,如$ 1,800.00。怎么做?感谢您的帮助。

i have stored currency in a database column like 1800 only. Now i want to show it in a label from database like $1,800.00. How to do that? Appreciate your help.

推荐答案

1,800.00。怎么做?感谢您的帮助。
1,800.00. How to do that? Appreciate your help.


在C#中试试这个:



Here try this in C#:

double value = 1800;
            CultureInfo us = CultureInfo.GetCultureInfo("en-US");
            string str = string.Format(us, "{0:C}", value);



它的str值为


It gets str value as "


1,800.00

希望它有所帮助。




Azee ......
1,800.00"
Hope it helps.

Good luck.

Azee...


这篇关于如何转换货币格式。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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