• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.