1.日期時間字符串驗證
DateTime applicationDatetime = new DateTime();
bool applicationDate = DateTime.TryParse("2019-09-18 11:00", out applicationDatetime);
applicationDate = true;//正確日期格式
DateTime applicationDatetime = new DateTime();
bool applicationDate = DateTime.TryParse("2019-09-18 11", out applicationDatetime);
applicationDate = false;//錯誤日期格式