I am having trouble when converting dates from json in a DateTime value that then I could insert into a database.
The problem comes because json's date format is mm/dd/yyy
and Trying to convert that value to datetime works until it comes a date like "07/13/2020"
.
fecha = json.created_at;
date = Convert.ToDateTime(fecha);
string finalDate = date.ToString("yyyy-MM-dd");
So I need to know how can I change format of this value, so then it can always be converted to datetime