Need to Change Date Format from string to Date

In addition to:

In general we would recommend to use ParseExact for converting the string into a dateTime
Afterwards we can reformat as needed

DateTime.ParseExact(YourInputString, YourFormat, System.Globalization.CultureInfo.InvariantCulture)

Format parts (in/out) are as:
grafik


Still we would recommend to check if the Time part is really breaking Month / year in the Position

Kindly note: Friday 20th Jan 2022 does not exist, it was a Thursday so parsing this date will fail
grafik

2 Likes