I have received two types of date format in excel MM/dd/yyyy and dd/MM/yyyy.
I want the output should be MM/dd/yy
I tried the below code but got error - “value of 1-dimensional arry to string can’t be converted to string”.
DateTime.ParseExact(“12/06/2023”, {“dd/MM/yyyy”,“MM/dd/yyyy”}, System.Globalization.CultureInfo.InvariantCulture).ToString(“MM/dd/yy”)