开发者

Nigerian time using asp.net

I want to show Nigeria开发者_运维技巧n time on my asp.net MVC 3 website. Do I need to change culture ?

currently, I am using like this:

@Model.ReportDate.ToString("hh:mm tt", System.Globalization.CultureInfo.InvariantCulture)

Please suggest.

Thanks.


Try doing this:

CultureInfo igNG = new CultureInfo("ig-NG"); //change according to specific Nigerian culture
@Model.ReportDate.ToString("c", igNG); //change 'c' to whatever format you want

CultureInvariant isn't associated with any particular country or region, just based on the English language.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜