I'm using C# and I have a strange problem: when I retrieve the date from MySQL and converting it to a string using ToString()
, it shows an error
Specified time is not supported in this calendar.
My code:
adapter = new MySqlDataAdapter(cmd);
adapter.Fill(dt);
foreach (DataRow row in dt.Rows)
{
table.Rows.Add(row[1].ToString(), row[3].ToString(), row[0].ToString(), row[2].ToString(), row[4].ToString());
}
The problem is my code is working fine when I run it on my office PC, but on my laptop it shows this error.
Everything is the same
UPDATE : I'm using Arabic dates (hijri) .