I am using jQuery DatePicker to get the date for a text field in a gridview to insert / update records. The datepicker date is accepted as a string. for example, the value "07/31/2014".
Using the following code, I will convert the date string to C # DateTime .
var sDate = ((TextBox)row.FindControlRecursive("iStartDateTBox")).Text; payment.StartDate = DateTime.ParseExact(sDate, "mm/dd/yyyy", null);
However, after the conversion, the value set for the "Payment Start Date" property will become "01/31/2014 12:07:00". I am simply perplexed about what is actually happening. And I would like some tips to solve this problem.
source share