title: Saving Date to SQLite
body: <pre><code>-(void)save:(id)sender
  {
  sqlite3_stmt *statement;
  const char *dbpath = [databasePath UTF8String];
  
  if (sqlite3_open(dbpath, &amp;expenseDB) == SQLITE_OK)
  {
  
      NSString *insertSQL = [NSString stringWithFormat:@"INSERT INTO ADDEXPENSE(date, description, category, amount) VALUES (\"%@\", \"%@\", \"%@\",\"%@\")", fieldOne.text, fieldTwo.text,fieldThree.text , fieldFour.text];
  
      const char *insert_stmt = [insertSQL UTF8String];
  
      sqlite3_prepare_v2(expenseDB, insert_stmt, -1, &amp;statement, NULL);
      if (sqlite3_step(statement) == SQLITE_DONE)
      {
        status.text = @"saved"
      } 
      else 
      {
         status.text = @"Failed"
      }
      sqlite3_finalize(statement);
      sqlite3_close(expenseDB);
  }
  }
  </code></pre>
  
  <p>This Method Works Fine For Me.But How to Save it as Date instead of strings?
  I tried a few ways but didnt work for me.
  As i am new to coding.someone please help me with a piece of code
   u u u u u u u u u This is the date Picker i used.</p>
  
  <pre><code>UIDatePicker *picker = (UIDatePicker *)sender;
  NSDate *dateSelected = [picker date];
  NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  [dateFormatter setDateFormat:@"dd.MM.yyyy"];
  self.fieldOne.text = [dateFormatter stringFromDate:dateSelected];
  </code></pre>