Date conversion topic

I have a date Thu 10 Nov 2022 and I’m using (Date.ParseExact(CurrentRow(“Column-0”).ToString,“ddd dd-MMM-yyyy”,System.Globalization.CultureInfo.InvariantCulture) to convert it into a date but I’m getting the error If: String was not recognized as a valid DateTime.

Why is this

Hey @duaine.b ,
Try this

DateTime.ParseExact("Thu 10 Nov 2022", "ddd dd MMM yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd-MM-yyyy")

Output :
image

Note : Output Value is of type String

Regards,

5 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.