Convert string to datetime in asp.net
<p>this is my input to a text box from a datetime calendar
 and to store the datetime in the DB i want the value to be changed to Date time. </p>

<pre><code>DateTime Res_date = Convert.ToDateTime(txt_RespondBy.Text); 
</code></pre>

<p>when I convert it gives a error saying string not recognised as valid date time. How to convert the input to date time..</p>

<p>value of txt_RespondBy.Text is : 10/27/2011 03:25</p>
