title: How to format and sort a date in Oracle?
body: <p>In my application  am trying to format and sort the date, i am using <code>to_char()</code> function to format the date to my required format, but when i sort them it is sorting it as string sorting. But i want them to be sorted as date.</p>
  
  <p>I need some help to achieve both in the same query. Kindly help me on the same.</p>
  
  <p>The query which i used was,</p>
  
  <pre><code>SELECT to_char( t1.your_date_column1, your_format_mask ) as alias,
    FROM your_table1 t1,your_table2
   ORDER BY t1.your_date_column1
  </code></pre>