title: looking up data in my database using datepart tsql function
body: <p>I need to find the durations result in the database but, that are in the range of between 2 and 10 min and 4 and 10 min this is what I have tried so far 
  for both BreakcalcB and Break Duration calculation. My answer is supposed to look what i have wrote in the rows for those two columns. 
  What i have tried works well for the first column BreakcalcB but for the second one it has given me results that are outside the range im looking for 
  one of the answers given as a result for 'Break Duration calculation' 1900-01-01 0:00 bt i dont want to see anything outside 2:10 and 4:10 but everything inside this  2:10 and 4:10 range on both columns</p>
  
  <pre><code>TranID      ServiceDate                 Time in                 Time Out                BreakcalcB              Break Duration calculation
  ----------- ------------------------- -----------------------   --------               ------------                ---------------
  1           2014-01-11 00:00:00:000   1900-01-01 09:00:00     1900-01-01 15:00:00   1900-01-01 02:10:00          1900-01-01 04:10:00
  2           2014-02-21 05:10:00:000   1900-01-01 09:00:00                           1900-01-01 02:00:00          1900-01-01 03:10:00 
  3           2014-04-08 04:34:12:000   1900-01-01 09:00:00                           1900-01-01 03:05:00          1900-01-01 02:15:00     
  4           2014-12-01 11:02:00:000   1900-01-01 08:00:00                           1900-01-01 02:05:00          1900-01-01 03:50:00  
  5           2014-01-07 07:52:55:000   1900-01-01 09:00:00                           1900-01-01 04:09:00 
  6           2014-01-01 19:59:11:000   1900-01-01 07:00:00                           1900-01-01 04:10:00                 .....
  
  
  
  select *
  from clienttime (nolock)
  where (datepart(hour,BreakcalcB) &gt;= 2  
                               and datepart(minute,BreakcalcB) &gt;= 10 
                               )
            and (datepart(hour,Break Duration calculation) &lt;= 4           
                               and datepart(minute,Break Duration calculation) &lt;= 10     
  
                               )     
  
  
  
     order by ClientID;
  </code></pre>