开发者

Converting Indonesian (id-ID) Date To English (en-US) Date

I am facing problem while converting Indonesian Date to English Date. Ex : I got an Date which is in Indonesian Language i.e 24/mars/1958 so I have to convert this date to English Date i.e 24/mar/1958 I tried to convert the date by using following code

string date = "24/mars/1958";
string newDate = DateTime.Parse(date, new CultureInfo("id-ID")).ToShortDateString();

but th开发者_运维技巧e above code is throwing error so can any one let me know how to convert this date to English Date

Thanks in Advance Nitesh Katare


Use DateTime.TryParseExact Method.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜