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);
In your example, where temp = 05/22/2017 15:00:00, you need your 'format' in ParseExact to match that syntax.
So I would try this,
DateTime test = DateTime.ParseExact(temp, "MM/dd/yyyy HH:mm:ss", CultureInfo.InvariateCulture);