title: How to change the date format when sending data into the database?
body: <p>I am using jquery full calendar to show some booking details. I am inserting date into the database  in <code>("yyyy-MM-dd")</code> format. </p>
  
  <p>But when i retrieve the title value from the calendar using <code>var title=$("#calendar").fullCalendar('getView').title;</code> it output as "June 2015". later i am using these two days for a comparison. Therefor i need to either send date into the database in "19 June 2015" format or convert title date value into  "06 2015". </p>
  
  <p>If anyone has a clear idea about this help me. Hope the problem is clear. I am using codeignier and i use the following cotroller method to send the data into the database.</p>
  
  <pre><code>function add_reservation() {
          $reservation_model = new Reservation_model();
          $reservation_service = new Reservation_service();
  
          $reservation_model-&gt;set_date_cal(trim($this-&gt;input-&gt;post('date', TRUE)));
         // $reservation_model-&gt;set_date(strtotime($this-&gt;input-&gt;post('date', TRUE)));
          $reservation_model-&gt;set_title(trim($this-&gt;input-&gt;post('selected_hall', TRUE)));
          $reservation_model-&gt;set_type(trim($this-&gt;input-&gt;post('selected_time', TRUE)));
          $reservation_model-&gt;set_description(trim($this-&gt;input-&gt;post('name', TRUE)));
          $reservation_model-&gt;set_advanced_payment_status(trim($this-&gt;input-&gt;post('optionsRadios', TRUE)));
          //$reservation_model-&gt;set_advanced_payment_status(trim($this-&gt;input-&gt;post('no', TRUE)));
          $reservation_model-&gt;set_paid_amount(trim($this-&gt;input-&gt;post('paid_amount', TRUE)));
          $reservation_model-&gt;set_fax(trim($this-&gt;input-&gt;post('fax', TRUE)));
          $reservation_model-&gt;set_telephone_number(trim($this-&gt;input-&gt;post('telephone', TRUE)));
          $reservation_model-&gt;set_address(trim($this-&gt;input-&gt;post('address', TRUE)));
          $reservation_model-&gt;set_menu_no(trim($this-&gt;input-&gt;post('selected_menu_number', TRUE)));
          $reservation_model-&gt;set_menu_price_per_plate(trim($this-&gt;input-&gt;post('menu_price', TRUE)));
          $reservation_model-&gt;set_is_deleted('0');
  
          $this-&gt;db-&gt;last_query();
  
          echo $reservation_service-&gt;add_reservation($reservation_model);
  
  
  }
  </code></pre>
  
  <p>basically i want to change the format of the date which i am sending to the database as "19 June 2015"</p>