I have a rad input that accepts dates only in the format specified, this works fine but when i try to convert it to datetime on the back end (in c# code) it says its not in the correct format.
<telerik:RadDateInput ID="DeliveryDate" runat="server"
MinDate="1/1/1980" MaxDate="12/31/2099" DateFormat="MM/dd/yyyy" Visible="false">
// Throws an error that its not in the correct format
DateTime Test = Convert.ToDateTime(DeliveryDate.Text);
When I add a break point at the DateTime line the text is being passed in this format (i dont know why if i specified MM/dd/yyyy).
2012-02-03 00:00:00
Any help would be much appreciated.
Regards
Use
DateTime test = DeliveryDate.SelectedDateinstead