title: compare time in excel
body: <p>Excel experts, need your help to compute the check column, details below. </p>
  
  <pre><code>Column A             | Column B                | Column C        | Column D           | Check
  12/07/2012  23:59:06 | 2012/07/12              | Thursday        | 23:59:06           |  ?
              -        | =TEXT(A2, "yyyy/mm/dd") | =TEXT(A3,"dddd")|=TEXT(A3,"HH:mm:ss")|
  </code></pre>
  
  <p>As you can see, I am extracting the date in column B, I am extracting the day in Column C, I have the time being extracted in Column D. </p>
  
  <p>Column Check should be true if the below condition is met and false otherwise:</p>
  
  <ol>
  <li>If day is Saturday or Sunday then should be true</li>
  <li>If day is Monday to Friday and Time is > 6:30 pm and time &lt; 07:30 am should be true.</li>
  </ol>
  
  <p>This is the formula I have build which does not seem to work.</p>
  
  <pre><code>=IF(OR(C2="Saturday",C2="Sunday")+OR((D2&gt;TIME(18,0,0)*AND(D2&lt;TIME(7,0,0)))),TRUE,FALSE)
  </code></pre>
  
  <p>I get true for pretty much everything. Any help will be greatly appreciated. </p>