I'm having a problem converting using the code below:
string vcto = "29/01/2018";
DateTime data;
Boolean resp = DateTime.TryParse(vcto, out data);
if (resp == false)
{
MessageBox.Show("ERRO NA CONVERSAO");
}
It is returning false
. but the date is correct.
I do not have access to the machine running the code, I just checked via log . On my development machine it works perfectly.
What can make TryParse()
fail? The date is correct.