I searched on the internet for a while now, but every answer i found, didn't worked for me.
I am trying to convert a string to a datetime, but every time i try different things, i get the exeption: System.FormatException: 'String was not recognized as a valid DateTime.
string temp = Request.QueryString["begintijd"];
DateTime test = DateTime.ParseExact(temp, "dd/MM/yyyy", CultureInfo.InvariantCulture);
The value of temp is: 05/22/2017 15:00:00
I also tried "MM/dd/yyyy" but that also fails.
MM/dd/yyyy hh:mm:sshhwill not work as it's used for 12h. In this instance,HHis needed.