Exception: Specified cast is not valid
Can any1 tell me why the below line throws an exception?
if ((DateTime.Now.TimeOfDay.CompareTo(((DateTime)RowSchedule["StartEnter"]).TimeOfDay) >= 0) && (DateTime.Now.TimeOfDay.CompareTo(((DateTime)RowTurno["LimiteEnter"]).TimeOfDay) <= 0))
The RowSchedule is a DataRow that retrieve the data from a Table from a DataSet. The table have 6 DateTime columns.
This is the excepton:
System.InvalidCastException
Additional information: Specified cast is not valid.
Can any1 tell me what is wrong?
Thax in advance.
johnbill2004Posted Oct 26, 2004, 4:47 AM
Carlos SanchezPosted Oct 18, 2004, 1:53 PM
itaym02Posted Oct 14, 2004, 3:24 AM