title: Oracle - get day of week
body: <p>It's Tuesday today.</p>
  
  <p>How come when I run this SQL statement, it says it's not Tuesday?</p>
  
  <pre><code>SELECT 
  CASE 
  WHEN TO_CHAR(sysdate, 'Day') = 'Tuesday' THEN 'Its Tuesday'
  ELSE 'Its Not Tuesday'  
  END AS case_result,
  TO_CHAR(sysdate, 'Day') AS day
  FROM DUAL
  </code></pre>
  
  <p>Returns:</p>
  
  <pre><code>CASE_RESULT DAY
  It's Not Tuesday    Tuesday
  </code></pre>