波斯语日期格式 [英] Farsi date format

查看:156
本文介绍了波斯语日期格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的
我有一个使用C#/asp(.net2008)/sql2008的网站
在ASP网格中显示了一些波斯日期.
我的计算机语言是英语,并且一切正常,但是在某些用户中,计算机语言设置是波斯语,并且日期格式错误,
我通过C#中的转换功能将公历日期转换为波斯日期(输出
该函数的字符串).更改此功能没有帮助

有什么解决办法吗? :rolleyes:

_________
抱歉!
此解决方案不起作用:((< 我用

Dears
I have a web site with C#/asp(.net2008)/sql2008
there are some Farsi dates that shows in asp grid
my computer language is English and every thing is OK but in some users computer language setting are Farsi and dates format is wrong ,
I convert Gregorian date to Farsi date by a convert function in C#(output
of this function is string) . change of this function is not helpful

Is there any solution? :rolleyes:

_________
Sorry!
this solution donot work :((
I use

<globalization culture="fa-IR" uiCulture="fa-IR" requestEncoding="UTF-8" responseEncoding="UTF-8" />



在web.config中进行测试,并使用&"en-US&"
但用户没有发现任何变化
还有另一种解决方案吗?



in web.config , and test with &quot;en-US&quot;
but the user wasn''t finding any changes
is there another solution?

推荐答案

您可以在页面级别将当前文化设置为波斯语,然后根据新的文化设置设置日期格式.

此处显示设置页面的当前区域性.
You could set your current culture to Farsi at page level and then format your date based on the new culture settings.

Setting the current culture for a page is shown here.


这篇关于波斯语日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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