yashvant k

yashvant k

  • NA
  • 29
  • 0

string-was-not-recognized-as-a-valid-datetime error.

Jun 25 2010 9:16 AM
hi friends,

i am getting string-was-not-recognized-as-a-valid-datetime error.
  
IFormatProvider format = new CultureInfo("en-US");
string temp =tbxFrom.Text; // dd/MM/yyyy
DateTime nonIsd = DateTime.Parse(temp, format, DateTimeStyles.None);

locally this code work fine, but in live it shows me error.

Any idea please why its happen so.

Regards,
yash

Answers (2)