如何在PHP中使用MySQL的'time'列格式将日期和时间组合在一起?
$date = New DateTime(); $time = $record->time //14:00:00
这样做
$date = New DateTime();
$date->setTime(explode(':',$record->time)[0],explode(':',$record->time)[1],explode(':',$record->time)[2]);
有7没有更好的方法
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号