Finding days between 2 unix timestamps in php

前端 未结 8 1158
一整个雨季
一整个雨季 2020-12-13 18:57

Hay, i have a database holding events. There are 2 fields \'start\' and \'end\', these contain timestamps. When an admin enters these dates, they only have the ability to se

8条回答
  •  执念已碎
    2020-12-13 19:23

    get the difference of two dates and divide it by 86400. abs(($date1 - $date2) / 86400) will produce the needed result

提交回复
热议问题