title: SSRS and null datetime
body: <p>I always thought that when a stored procedure brought back a null datetime that an SSRS report would show mindate in that cell. The thing is, in my experience this is not always true. I can't figure out why. Sometimes a report will show blank and sometimes mindate for a null datetime. Why is that? </p>
  
  <p>Is there rules or documentation (that makes sense) that explains how this works? It's hard to be consistent when the tools you are using are not consistent. I can make two reports that are set up exactly the same way. One will show mindate and one will show blank for null datetimes. I don't get it.</p>
  
  <p>EDIT:</p>
  
  <p>First of all, yes the mindate thing has happened to many. 
  <a href="https://www.google.com/search?num=50&amp;q=ssrs+null+date+show+blank&amp;oq=ssrs+null+date+show+blank&amp;gs_l=serp.3...8759.9774.0.9941.10.10.0.0.0.0.152.888.8j2.10.0....0...1c.1.25.serp..8.2.166.kl2WBVx4Ijw" rel="nofollow">https://www.google.com/search?num=50&amp;q=ssrs+null+date+show+blank&amp;oq=ssrs+null+date+show+blank&amp;gs_l=serp.3...8759.9774.0.9941.10.10.0.0.0.0.152.888.8j2.10.0....0...1c.1.25.serp..8.2.166.kl2WBVx4Ijw</a></p>
  
  <p>Almost every result has someone talking about the mindate when they want a blank. Many of the results are from Stack Overflow so before you start telling me it never happens, realize you are flat wrong. You may have never seen it. I have never seen a severed finger in my food in all my years of eating and thousands of meals. Doesn't mean it hasn't happened to someone.....</p>
  
  <p>Example of one that is showing min date:</p>
  
  <p>In the report the expression for the text box is:</p>
  
  <pre><code>=Fields!SecondaryInjuryRecordDate.Value
  </code></pre>
  
  <p>The number formatting was set to Date->01/31/2000 in the placeholder properties window.
  Pretty straightforward, nothing weird going on there. RIGHT?</p>
  
  <p>In the proc, the code for that column is:</p>
  
  <pre><code>CASE WHEN ISNULL(l.SecondaryInjury, 0) = 0 THEN '' ELSE l.SecondaryInjuryDXDate END AS SecondaryInjuryRecordDate
  </code></pre>
  
  <p>That resulted in mindate being shown whenever SecondaryInjuryDXDate was null. I had to switch to this:</p>
  
  <pre><code>CASE WHEN ISNULL(l.SecondaryInjury, 0) = 0 THEN '' ELSE ISNULL(l.SecondaryInjuryDXDate, '') END AS SecondaryInjuryRecordDate
  </code></pre>
  
  <p>...to get blanks when the date was null.</p>
  
  <p>SecondaryInjuryDXDate is a DATETIME and
  SecondaryInjury is a bit.</p>