title: How to get output as 'NA' if date is Null and datetime format if not null?
body: <p>Here I had a query,</p>
  
  <pre><code>SELECT MIN(DATE)  FROM tableA
  </code></pre>
  
  <p>Here,If the date value is Null then it should display 'NA',</p>
  
  <pre><code>SELECT isnull(convert(varchar(10),MIN(DATE)),'NA')  FROM tableA
  </code></pre>
  
  <p>It worked for the case MIN(DATE) is null but if it not null the ouput is getting in different format like <code>May 11</code> etc How can I fix this?</p>