Hi i have a problem Error 1 Operator '<' cannot be applied to operands of type 'object' and 'System.TimeSpan'. to use timespan with < is there any type of code?
SqlCommand cmd = new SqlCommand("SELECT * FROM tblBooking", conn);
SqlDataReader rdr = cmd.ExecuteReader();
DateTime ts = new DateTime();
TimeSpan asd = ts.TimeOfDay;
while (rdr.Read())
{
int x = Booking.noOfpersons;
for (int i = 0; i < rdr.FieldCount; i++)
{
if (rdr[7] < asd)
{
iftrue = true;
}
}