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
精彩评论