var timestamp = DateTime.ParseExact("20140101T000000Z", "YYYYMMDDThhmmssZ", CultureInfo.InvariantCulture);
System.FormatException was unhandled by user code
HResult=-2146233033
Message=String was not recognized as a valid DateTime.
Source=mscorlib
這是沒有意義的,我作爲YYYYMMDDThhmmssZ
是ISO-8601 YYYY-MM-DDThh:mm:ssZ
去除特殊格式化字符。System.DateTime.ParseExact:無法識別的格式字符串
我編輯了你的問題。看看爲什麼:http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles –