how to convert date to yyyy-mm-dd format in c#?
ToString(); string createddate = Convert. ToDateTime(dateTime). ToString("yyyy-MM-dd h:mm tt"); DateTime dt = DateTime. ParseExact(createddate, "yyyy-MM-dd h:mm tt",CultureInfo.