title: How to extract week number in sql
body: <p>I have a transdate column of varchar2 type which has the following entrees </p>
  
  <pre><code>01/02/2012
  01/03/2012
  </code></pre>
  
  <p>etc.</p>
  
  <p>I converted it in to date format in another column using to_date function. This is the format i got.</p>
  
  <pre><code>01-JAN-2012
  03-APR-2012
  </code></pre>
  
  <p>When I'm trying to extract the weekno, i'm getting all null values. </p>
  
  <p>select to_char(to_date(TRANSDATE), 'w') as weekno from tablename.</p>
  
  <pre><code>null
  null
  </code></pre>
  
  <p>How to get weekno from date in the above format? </p>