I want compare the date by first converting the string "14012019" to Datetime
This is the code that I have tried
DateTime dateTime = DateTime.Parse("14012019")
;
and
DateTime dateTime = DateTime.ParseExact("14012019", "yyyyMMddHHmmss", CultureInfo.InvariantCulture, DateTimeStyles.None);
and
Convert.ToDateTime("14012019")
This is the error I'm getting String was not recognized as a valid DateTime Exception.