Android sqlite date comparison?
<p>How can I compare dates using where statement in sqlite?
I don't know how to write date in timestamp format in DB.
I guess only timestamp format (integer or string in database) I can compare?!</p>

<p>Can someone help me with code for writing date in db (using ContentValues )</p>

<p>I want to use this code for comparison:</p>

<pre><code> Cursor mCursor =
             db.query(true,
               tableName,
               null, 
               KEY_DATETIME + " &gt;= '"+ fromDate +"' and " +
                 KEY_DATETIME + " &lt;= '"+ toDate +"'" , 
               null,
               null, 
               null, 
               null, 
               null);
</code></pre>
