title: Converting string 'yyyy-mm-dd' to date
body: <p>I want to select from table where date column is equal to specific date which I sending as a string in format 'yyyy-mm-dd'. I need to convert that string and than to compare if I have that date in my table.</p>
  
  <p>For now I am doing this:</p>
  
  <pre><code>  select *
    FROM table
    where CONVERT(char(10), date_column,126) = convert(char(10), '2016-10-28', 126)
  </code></pre>
  
  <p>date_column is a date type in table and I need to get it from table in this format 'yyyy-mm-dd' and because that I use 126 format. I am just not sure with the other part where I converting string which is already in that format and do I need to convert it because I don't know is it good to use this:</p>
  
  <pre><code> CONVERT(varchar(10), date_column,126) = '2016-10-28'
  </code></pre>