use queries with parameter instead of plain sql, which will prevent sql injections. Also check whether your store time in the database column specified.
SqlCommand cmd = new SqlCommand("SELECT * FROM table_name WHERE dateTimeField = @SomeDate");
cmd.Parameters.AddWithValue("@SomeDate", DateTime.Today);