我需要將日期時間轉換爲日期時間用逗號格式化。這是必需的日曆appointment.Start(EWS託管API):使用逗號將日期時間DateTime轉換爲日期時間#
appointment.Start = new DateTime(2014, 1, 2, 9, 0, 0);
,但我想做的事:
DateTime myDateTime = DateTime.Now;
appointment.Start = new DateTime(myDateTime);
此錯誤
爲「最好的重載方法匹配System.DateTime.DateTime(長)' 有一些無效的參數。
顯然缺少參數,但我不知道哪些參數!
請看下面鏈接的信息在C#的DateTime格式: http://msdn.microsoft.com/ en-us/library/8kb3ddd4(v = vs.110).aspx –