title: SQL Server : comparing variables
body: <p>I'm pretty new with stored procedures, and I have to make a comparison with two dates, to know if they are equal or not.</p>
  
  <p>If the dates are equal, I have to return just one of these, else, I have to return the two dates. </p>
  
  <p>With this code, the return is coming into an integer number, that I can't indentify.</p>
  
  <p>this is the code:</p>
  
  <pre><code>CASE
    WHEN gru.date1 = gru.date2 THEN 
      CONVERT (CHAR(11), gru.date2,103)
    ELSE
      CONVERT(CHAR(10), gru.date1,103) + CHAR(32)+CHAR(97)+CHAR(32) + CONVERT(CHAR(11), gru.date2,103)
  END date'
  </code></pre>