Дмитрий Asked:2020-03-22 03:45:26 +0000 UTC2020-03-22 03:45:26 +0000 UTC 2020-03-22 03:45:26 +0000 UTC 将字符串转换为日期时间 772 你能告诉我如何将字符串转换21.03.2020为类型DateTime吗?我尝试过这种方式,但出现错误。 string date = "21.03.2020"; DateTime date2 = DateTime.ParseExact(date, "dd/MM/yyyy", null); c# 1 个回答 Voted Best Answer user176262 2020-03-22T03:48:50Z2020-03-22T03:48:50Z string date = "21.03.2020"; DateTime date2 = DateTime.ParseExact(date, "dd.MM.yyyy", null);
1 个回答