title: Java Current Date Time not recognized by Sqlite DateTime
body: <p>I am using the following code in Android to get current date time </p>
  
  <pre><code>Date currentDateTime = new Date();
  </code></pre>
  
  <p>And storing it in the sqlite table as </p>
  
  <pre><code>currentDateTime.ToString()
  </code></pre>
  
  <p>SO in the table the values are stored like so</p>
  
  <pre><code>"Tue Sep 11 20:32:39 IST 2012"
  "Thu Sep 13 17:23:38 IST 2012"
  "Thu Sep 13 17:34:38 IST 2012"
  "Thu Sep 13 20:21:58 IST 2012"
  </code></pre>
  
  <p>Now I need to sort them in sqlite in desc order i.e.</p>
  
  <pre><code>select datetime(datecolumn) from table order by datetime(datecolumn) desc;
  </code></pre>
  
  <blockquote>
    <p>But when I do datetime(column) on the field it shows me null for all the rows on the date field</p>
  </blockquote>
  
  <p>Obviously there is a data mismatch on the sqlite side. But I am not sure how to fix it - Is there a way I can still change the query on the sqlite side to be able to read this? Or do I have to change the JAVA code and insert the data in a sqlite readable format. </p>
  
  <p>I need the times also since I am dealing with hourly data. </p>