The datetime.parseexact is not taking string() in format argument

Hi @Aakash_Singh_Rawat

Try the below syntax:

DateTime.ParseExact("my_date_str", {"MMMM yy", "MMMM yyyy"}, System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None).ToString("MMM yyyy")

Hope it helps!!

1 Like