str = "select partyname from casetab WHERE jdate='" +Convert.ToDateTime(listJDate.SelectedItem.ToString()).Year.ToString() + "'";
string datetime_as_string = "<Your date time string here>"; DateTime datetime; try { datetime = DateTime.Parse(datetime_as_string); } catch(FormatException fEx) { // handle the failure here, the string was not in a valid format }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)