title: Query a PostgreSQL character varying column by parts of the string
body: <p>Background: We are pulling hundreds of excel documents using python and xlrd module and putting those results into a Postgres 8.4 database. The problem is excel stores date time as a crazy floating point number that's a ratio of the number of days between now and Dec 31 1900. Normally the last significant digits of the float are cut off which can make our dates off by as much as 35 days. </p>
  
  <p><a href="http://office.microsoft.com/en-us/excel-help/datevalue-HP005209044.aspx" rel="nofollow noreferrer">http://office.microsoft.com/en-us/excel-help/datevalue-HP005209044.aspx</a></p>
  
  <p>So we changed our process and date times are stored as strings in excel documents in this format.
      31-MAR-2014 00:00:00</p>
  
  <p>These are then ripped and ingested into a postgres database as character varying columns. However now is the issue of querying. I understand one possible solution is adding an additional column and converting the dates over to postgres dtm values. </p>
  
  <p>What my question is though can I query and return results based on parts of a string in postgres. For example could I do this if I wanted to pull all entries on 23 Feb 2013</p>
  
  <pre><code>SELECT * FROM finance_table WHERE date_value contains? = "23-FEB-2013'
  </code></pre>