I want to convert a value of CurrentRow (3/19/2024 4:00:05 PM) from type String to type DateTime. Using the expression- DateTime.ParseExact(DashboardDateTime,“dd/MM/yyyy”, System.Globalization.CultureInfo.InvariantCulture)
I have been trying it however encountering with an error, which I have mentioned below-
You provided date format doesn’t matching your Input excel data. Your input date format is in M/dd/yyyy h:mm:ss tt but you have given dd/MM/yyyy. Just replace the format in your expression.
Just changed the highlighted part in your expression,
DateTime.ParseExact(DashboardDateTime,“dd/MM/yyyy”, System.Globalization.CultureInfo.InvariantCulture)