I am receiving this exception on XP running machine but on windows 7, there is no issue. I am trying to format date time as follows,
dr.BeginEdit();
dr["Pdate"] = ((DateTime)dr[dc]).ToString("dd/MM/yyyy hh:mm:ss tt", CultureInfo.InvariantCulture);
dr.EndEdit();
dr.AcceptChanges();
It is working fine for ‘2012-03-04 00:00:00.000’ but issue is for ‘2011-06-22 00:00:00.000’
Any idea?
I added the following in web.config file and it solved the problem.
http://msdn.microsoft.com/en-us/library/bz9tc508.aspx