title: Nested Queries in SQLite3 Android
body: <p>I want to execute a query something like :</p>
  
  <pre><code>INSERT INTO MyTable VALUES(datetime('now'));
  </code></pre>
  
  <p>Where <code>MyTable</code> has schema:</p>
  
  <pre><code>CREATE TABLE MyTable(
  mydate DATETIME
  )
  </code></pre>
  
  <p>When executed in SQLite Manager query runs perfectly inserting the current datetime value in <code>mydate</code> column of <code>MyTable</code>.</p>
  
  <p>But when executed using </p>
  
  <pre><code>ContentValues cv=new ContentValues();
  cv.put(MyTable.mydate,"datetime('now')");
  getContentResolver.insert(MyTable.CONTENT_URI,cv);
  </code></pre>
  
  <p>The value in mydate reads <strong>datetime('now')</strong> and not the actual current date and time.</p>
  
  <p>I am performing all this from a ContentProvider.</p>
  
  <p>How can I fix this ?</p>