Question: how to convert string to date in c#in yyyy-mm-dd format?
Answer: The format of the string representation must match a specified format exactly or an exception is thrown. You should use MM/dd/yyyy format instead. DateTime dt = DateTime. ParseExact("04/26/2016", "MM/dd/yyyy", CultureInfo.