title: Using SQL Case When with dates
body: <p>I've got a column in a query i wrote that looks like follows.</p>
  
  <pre><code>**RCPT_DATE**
  NULL
  2017-01-09 00:00:00.000
  NULL
  NULL
  1900-01-01 00:00:00.000
  1900-01-01 00:00:00.000
  1900-01-01 00:00:00.000
  2016-09-05 00:00:00.000
  </code></pre>
  
  <p>What I want to do is get rid of <code>NULL</code> values and display 'Unavailable' and display 'No Rcpt' instead of '1900-01-01 00:00:00.000' values to make it look cleaner.</p>
  
  <p>I've tried below but it doesn't do anything</p>
  
  <pre><code>CASE c.RCPT_DATE
      WHEN '1900-01-01 00:00:00.000' THEN ''
      WHEN NULL Then 'xxx'
      ELSE c.RCPT_DATE
      END AS RCPT_DATE,
  </code></pre>
  
  <p>I've tried,</p>
  
  <pre><code>CASE c.RCPT_DATE
      WHEN '1900-01-01 00:00:00.000' THEN NULL
  </code></pre>
  
  <p>this prints <code>NULL</code> instead of '1900-01-01 00:00:00.000' values but that's not what I Want.</p>
  
  <p>Any help appreciated</p>
  
  <p>Thanks</p>