Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
This simply means that either of below is false:starttime == Convert.ToDateTime(ds.Tables["t"].Rows[i][2].ToString()ORendtime == Convert.ToDateTime(ds.Tables["t"].Rows[i][3].ToString())If you are expecting both of them to be true in some scenario then DEBUG and see what's going wrong....
To add to previous answer, you should never concatenate literals to SQL statements. This makes you vulnerable to SQL injections, data conversion mismatches etc. Use SqlParameter[^] instead.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.