I have a date in the following format 10/16/2018 or this is in MM / DD / YYYY format so it comes as a parameter, but this date is as string and I need to convert it to a datetime, try the following:
string fecha = "10/16/2018";
DateTime dt = DateTime.Parse(fecha);
And this error is generated: the string can not be recognized as a valid datetime value, please help, however when the date is in DD / MM / YYYY format if it works, but I must have the date in the format above. Thanks