title: Web sql dates ordered as text and not by date precedence
body: <p>I am consuming an Oracle APEX REST web service  using HTML5. Some records are retrived from the server and stored locally using <strong>web sql</strong>. Local table has the same structure as the server db table, including a DATETIME column. </p>
  
  <pre><code>Example data:
  01   10-03-2015 12:00  (March 10th, 2015)
  02   01-04-2015 13:45  (April first, 2015)
  03   03-05-2015 20:00  (May 3rd, 2015)
  </code></pre>
  
  <p>I have trouble with local storage (web sql) because when I order all table records by that datetime column, it is ordering the records following a text based order (from left to right): <strong>DD-MM-YYYY HH:MI</strong></p>
  
  <p>The code I am using in HTML5 to get these records ordered is:</p>
  
  <pre><code>select * 
  from local_table
  order by fecha
  </code></pre>
  
  <p>Wrongly I am getting this:</p>
  
  <pre><code>02   01-04-2015 13:45  (April first, 2015)
  03   03-05-2015 20:00  (May 3rd, 2015)
  01   10-03-2015 12:00  (March 10th, 2015)
  </code></pre>
  
  <p>When you check this records directly in Oracle DB without specifying a format, DATES are stored <strong>DD-MM-YYYY HH:MI</strong>. Oracle is not having trouble ordering those records by DATE because when I order them in ORACLE i am getting the right order:</p>
  
  <pre><code>01   10-03-2015 12:00  (March 10th, 2015)
  02   01-04-2015 13:45  (April first, 2015)
  03   03-05-2015 20:00  (May 3rd, 2015)
  </code></pre>
  
  <p>Do I have to order date value just before I store it locally in order to have it stored in YYYY-MM-DD HH:MI so I can have them correctly ordered? </p>
  
  <p>I saw another post where somebody suggest that, but I wonder if that is a workaround or the only way to do it. </p>
  
  <p>Thanks</p>