我有以下幾點:C#日期格式問題
string QDI_DATE_FORMAT = "yyyy-MM-ddTHH:mm:00.0000000K";
string from = "2016-06-20T16:20:00.0000000-04:00";
string to = "2016-06-21T16:21:00.0000000-04:00";
DateTime fromDate = DateTime.ParseExact(from, QDI_DATE_FORMAT, CultureInfo.InvariantCulture, DateTimeStyles.None).Date;
DateTime toDate = DateTime.ParseExact(to, QDI_DATE_FORMAT, CultureInfo.InvariantCulture, DateTimeStyles.None).Date;
Console.WriteLine(fromDate);
Console.WriteLine(toDate);
此打印出無小時和分鐘的日期。我如何使它工作並顯示時間?