开发者

Is it possible to convert the Datetime.Now to Tamil Unicode character in .NET

I'm wondering if .NET allow multilanguage support for Datet开发者_JAVA技巧ime?

I'm trying to convert the Datetime.Now value to equal Tamil Unicode character.


CultureInfo taIN = new CultureInfo("ta-IN");
var dateTimeString = DateTime.Now.ToString(taIN);


The DateTime data type stores its information in binary. To convert it to a string, use the ToString method.

This should convert it to a string in the current culture. If that culture is set to produce Tamil date formats, then it will be in Tamil.


If the Tamil culture was installed/availible, you could simply call, for instance,

DateTime.Now.ToString("yyyyddMM", CultureInfo.GetCultureInfo("si-LK","si-LK")); // Sri-Lankan culture info
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜