Tag Archives: c# valid DateTime

DateTime.ParseExact String was not recognized as a valid DateTime

This short blog shows one of the possible causes of the error “String was not recognized as a valid DateTime”. You have a code CultureInfo provider = CultureInfo.InvariantCulture; DateTime dte = DateTime.ParseExact(“2017-07-28”, “YYYY-MM-DD”, provider); The code seems fine but actually … Continue reading

Posted in .Net, Community, Computers and Internet | Tagged , , | Leave a comment