2018-11-29 07:22
浏览 127


I have selected two dates in a date range picker and stored them in one data base column but it only stores one date, like: 0000-00-00. I can't store two dates in one column so I want to split this string into two variable by hyphen (-).

This is my date range function:

   $(function () {

       //Initialize Select2 Elements

     //Date range picker


This is my date insert code:

'bilty_date_range'      => date('y-m-d',strtotime($bilty_date_range)),

I am selecting the date like this: enter image description here

The backend result is like this: 11/07/2018 - 12/25/2018 .

4条回答 默认 最新

相关推荐 更多相似问题