Welcome Guest, Not a member yet? Register   Sign In
date format

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:

$("#date_from").datepicker({dateFormat: 'dd-mm-yy'});



Then in site controller I have a function for adding data into array and a line


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

Theme © iAndrew 2016 - Forum software by © MyBB