I am receiving the API responses and doing some logic.
I am trying to convert a string to DateTime but I am unable to convert it in C#. I tried multiple ways but I am getting string in invalid format.
I need to convert "EEE MMM d HH:mm:ss z yyyy" to an equivalent DateTime format in C#.
I have two dates as below and need to calculate the total days from the two dates
var dt1="Wed Jul 14 07:59:30 BST 2021"; var dt2="Fri Jul 16 08:59:30 BST 2021";
Please give me any suggestions.