DateTime date; if (dr["From_Date"].ToString() != "") { if (DateTime.TryParseExact(dr["From_Date"].ToString(), "dd.MM.yyyy", null, DateTimeStyles.None, out date)) { return "Please specify \"From_Date\" in dd.mm.yyyy format."; } }
... if (!DateTime.TryParseExact(dr[...
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)