You need to use formatting when converting the string.
Some options. Pick a winner.
If your date format looks like this "dd/MM/yyyy" then use this code
DateTime from_dt = DateTime.ParseExact(from_date.Text, "dd/MM/yyyy", null);
If your date format looks like this "MM/dd/yyyy" then use this code
DateTime from_dt = DateTime.ParseExact(from_date.Text, "MM/dd/yyyy", null);
If your date format looks like this "yyyy-MM-dd" then use this code
DateTime from_dt = DateTime.ParseExact(from_date.Text, "yyyy-MM-dd", null);
Refer to these links for more info
Standard Date and Time Format Strings[
^]
Custom Date and Time Format Strings[
^]
Refer to these links for more info
Standard Date and Time Format Strings[
^]
Custom Date and Time Format Strings[
^]