I am facing an issue while assign value to DateTime stdt please find below my code logic
startdate="06/20/2016 12:30" //format (MM/dd/yyyy HH:mm)
DateTime stdt = Convert.ToDateTime(startdate);
also, I had tried with below code but didn't work.
DateTime stdt = DateTime.ParseExact(startdate, "dd/MM/yyyy", CultureInfo.InvariantCulture);
DateTime.ParseExact(startdate, "MM/dd/yyyy HH:mm", CultureInfo.InvariantCulture);. WithParseExactyou have to give the exact format