Check out example codes for "convert string date to datetime and format". It will help you in understanding the concepts better.

Code Example 1

var dateString = "2020-09-25T10:13:21.246321+01:00";
String formattedDateString = DateFormat('do LLLL yyyy').format(DateTime.parse(dateString)); 
// formattedDateString - OUTPUT: "25 September 2020"

Code Example 2

string iDate = "05/05/2005";
DateTime oDate = Convert.ToDateTime(iDate);
MessageBox.Show(oDate.Day + " " + oDate.Month + "  " + oDate.Year )

Code Example 3

.Net str to DateTime

Learn ReactJs, React Native from akashmittal.com