How to insert values from JQuery datepicker to MySQL date datatype using Codeigniter?

后端 未结 5 884
一整个雨季
一整个雨季 2021-02-09 18:19

i can\'t insert the values from my JQuery Datepicker to my MySQL database with Date datatype. how will i convert string to date datatype? im using Codeigniter with MVC. here\'s

5条回答
  •  名媛妹妹
    2021-02-09 18:46

    Use the following to format the datepicker:

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

提交回复
热议问题