Hello everyone,
I have an excel which has column name date and it has value like Jan/15/2020 and it’s in date format but I want to convert it into string and when I am trying to convert in string it’s giving me error. Could you please help me I have. Tried parse method as well
If the input date format in dd-MMM-yyyy
Result Assign in string variable → DateTime.ParseExact(your DateTime variable, “dd-MMM-yyyy”, System.Globalization.CultureInfo.InvariantCulture).Tostring(“MMM/dd/yyyy”)
If the input date format in MMM/dd/yyyy
Result Assign in string variable → DateTime.ParseExact(your DateTime variable, “MMM/dd/yyyy”, System.Globalization.CultureInfo.InvariantCulture).Tostring(“MMM/dd/yyyy”)