System.InvalidCastException
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.
Any idea?
Thax in advance.
bilnaadPosted Oct 12, 2004, 7:10 PM
bilnaadPosted Oct 12, 2004, 7:09 PM
Carlos SanchezPosted Oct 12, 2004, 1:24 PM
bilnaadPosted Oct 12, 2004, 10:46 AM