-6

如何将下面的字符串转换为 C# 中的 DateTime 实例?

2013 年 9 月 4 日星期三 00:00:00 GMT+0530(斯里兰卡标准时间)

4

1 回答 1

0

您可以使用ParseExact

string date = "Wed Sep 04 2013 00:00:00 GMT+0530";
var datex = DateTime.ParseExact(date, "ddd MMM dd yyyy hh:mm:ss GMT+0530", CultureInfo.InvariantCulture);
于 2013-09-24T08:50:18.703 回答