0
I believe you cannot convert any string to datetime. A better solution is normalize that string cheking if is a Date, if is not you need to start search for some format: YYYY-MM-DD, DD.MM.YYYY, DD/MM/YYYY, MM/DD/YYYY and so on... after that convert as DateTime
0
Please provide what is the value you are getting in textbox(TxtPolCreatedDate.Text). Based on textbox value we need to write formatting. Follow below link that may help you:
http://www.c-sharpcorner.com/article/datetime-in-c-sharp/
http://www.c-sharpcorner.com/UploadFile/manas1/string-to-datetime-conversion-in-C-Sharp/
0
In which format are you giving the value to the textbox TxtPolCreatedDate.Text?
Try giving value in yyyy-MM-dd format and check.