Hi folks,
The recent code: DateTime.ParseExact(“my_date_str”, {“MMMM yy”, “MMMM yyyy”}, System.Globalization.CultureInfo.InvariantCulture).ToString(“MMM yyyy”)
was working.
Now after a month, it’s throwing an error stating we can’t use string() in format but string.
I have tried downgrading/upgrading system package still the issue persists.
Parvathy
(PS Parvathy)
2
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
Thank you @Parvathy,
It works, minor issue it was
1 Like
Parvathy
(PS Parvathy)
5
You’re welcome @Aakash_Singh_Rawat
Happy Automation!!
1 Like
system
(system)
Closed
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.