I’ve done this before and it’s worked without issue. I extract a date off of a PDF in the format of April 1, 2022. I want to convert April to 04. I’ve used the code datetime.parseextact(TrimeDate.trim(), “MMMM dd, yyyy”, System.Globalization,CultureInfo.InvariantCulture).ToString(“MM”).
When I debug i get the following error on that assign: Assign: String was not recognized as a valid DateTime.
How can I fix this?