String was not recognized as a valid DateTime
ParseExact
string timeStr = "2016/02/22"; DateTime dtObject = DateTime.ParseExact(timeStr, "yyyy/MM/dd", CultureInfo.InvariantCulture);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)