In my c# code, I am getting an Arabic date from a function, I need to convert this date to English format (UK/US
). I tried with the following code
string startdate = "٢٠١٩-٠٩-٠٣";
var dateTime = DateTime.ParseExact(
startdate,
"d MMMM yyyy",
CultureInfo.InvariantCulture);
it throws exception:
System.FormatException: 'String was not recognized as a valid DateTime.'