title: varchar vs datetime in sql
body: <p>I was having problem in retrieving from SQL Server so I posted this [question][1]</p>
  
  <p>I did not get any suitable answers. So I have changed the column datatype from <code>datetime</code> to <code>varchar</code> and now it works fine.</p>
  
  <pre><code>SELECT *  
  FROM test
  WHERE (timeStamp BETWEEN '05-09-2013 18:23:57' AND '05-09-2013 18:23:59')
  </code></pre>
  
  <p>But my query if <code>varchar</code> datatype can play the role of <code>datetime</code> and in <code>varchar</code> we can also store the string then why sql provides <code>datetime</code> datatype? I know <code>varchar</code> occupies more space than <code>datetime</code>. I would like to know other reasons.</p>