date format - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: date format (/showthread.php?tid=45492) |
date format - El Forum - 09-23-2011 [eluser]Michal1[/eluser] Hey guys, I am inserting a selected data from a jquery date picker into database field and I have a little problem with that. In my view I have: Code: [removed] Then in site controller I have a function for adding data into array and a line Code: 'date_from'=>$this->input->post('date_from'), Then in model I of course insert it into database into 'date_from' field which has a type "date". The problem is that as you can see I set format of date_from in my view to: dd mm yy while my field in database is automatically set to yyyy mm dd. And I dont know how to change that field in database to my view format? Thank you |