title: How to corectly insert a datetime value in SQLite under Android?
body: <p>I'm working on a dummy android project to get a hang of things. The following line of code breaks my android application without any error. I'm using Idea as an IDE.    </p>
  
  <pre><code>database.execSQL("Insert Into todos(uid, name, created_on, changed_on) values('6a7047ed-c2f9-407f-a774-1c02b0fe9caf', 'todo', DATETIME('NOW'), DATETIME('NOW'))");
  </code></pre>
  
  <p>I'm sure the database has the given columns, and if I just use:</p>
  
  <pre><code>database.execSQL("Insert Into todos(uid, name) values('6a7047ed-c2f9-407f-a774-1c02b0fe9caf', 'todo')");
  </code></pre>
  
  <p>The application works the way it should.</p>
  
  <p>I tried to insert dates like this (<a href="https://stackoverflow.com/questions/1933720/how-do-i-insert-datetime-value-into-a-sqlite-database">based on answered question related to this matter</a>):</p>
  
  <pre><code> '2012-05-25 16:52:00'
  </code></pre>
  
  <p>or</p>
  
  <pre><code> date('now')
  </code></pre>
  
  <p>I get the same crash with no error or debug log.</p>
  
  <p>What am I missing here?</p>
  
  <p><strong>Updated</strong></p>
  
  <p>As requested, the code used to create the database table.</p>
  
  <pre><code>    public static final String TABLE_TODOS = "todos";
      public static final String COLUMN_ID = "id";
      public static final String COLUMN_UID = "uid";
      public static final String COLUMN_NAME = "name";
      public static final String COLUMN_CHECKED = "checked";
      public static final String COLUMN_TO_DELETE = "must_delete";
      public static final String COLUMN_CHANGED_ON = "changed_on";
  
      public static final String COLUMN_CREATED = "created_on";
  
      private static final String DATABASE_CREATE = "create table "
              + TABLE_TODOS + "( "
              + COLUMN_ID + " integer primary key autoincrement, "
              + COLUMN_UID + " varchar(50), "
              + COLUMN_NAME + " text not null, "
              + COLUMN_CHECKED + " integer default 0, "
              + COLUMN_TO_DELETE + " integer default 0, "
              + COLUMN_CHANGED_ON + " datetime "
              + COLUMN_CREATED + " datetime "
              +");";
  </code></pre>