I have a component in c# and I write the following code:
string SearchString = " and StartDate Between '"
+ string.Format("{0:yyyy/MM/dd}", Convert.ToDateTime(calender_az.Text))
+ "' And '" + string.Format("{0:yyyy/MM/dd}", Convert.ToDateTime(calender_ta.Text))
+ "'";
and it works but it has error like this:
string was not recognized as a valid date time? calender_az is date picker
what should I do?