Datetime To Unix timestamp

前端 未结 6 1624
长发绾君心
长发绾君心 2020-12-10 12:22

Is there anyone sitting on a PHP function to convert a date of format 0000-00-00 00:00:00(datetimesql) to unix timestamp?

6条回答
  •  臣服心动
    2020-12-10 12:59

    @bartek - As you noted, PHP's strtotime function is perfect for this. It can handle most common date formats, including strings like "tomorrow" or "+5 months".

提交回复
热议问题