Hi,
Can someone help me, I'm trying to convert a string to a datetime as follows:
var format = "dd/MM/yyyy hh:mm";
string date = BookingDateTextBox.Text + ' ' + HourDropDownList.SelectedValue + ':' + MinuteDropDownList.SelectedValue;
DateTime.ParseExact(date, format, CultureInfo.InvariantCulture);
However, entering the date as follows: 01/02/2015 09:00 I get the following error:
Exception Details: System.FormatException: String was not recognized as a valid DateTime.
How do I get around this:
Thanks in advance
Rob
Go to the complete details ...