1
I am trying to receive a string typed by the user in the format "dd/MM/yyyy hh:mm", but whenever I use a date above 12:59 the following error occurs:
System.Formatexception: 'String '25/06/2018 13:00' was not recognized as a Valid Datetime.'
Code:
DateTime inicio = DateTime.ParseExact(Console.ReadLine(), "dd/MM/yyyy hh:mm", CultureInfo.InvariantCulture);