The following code is causing an error, any ideas why?
string dateFormatString = "dd.MM.yyyy HH:mm:ss"; string properDate = DateTime.ParseExact(DateTime.Now.ToString() , dateFormatString , null ).ToString()
Error: The string is not recognized as a valid date and time.
source share