PHP转换日期/时间格式从'd/m/Y H:i:s'到'H:i:s'?(复制)

时间:2022-06-18 21:28:49

This question already has an answer here:

这个问题已经有了答案:

I have a timestamp column in my database with dates and times formatted like '24/06/2015 14:30', but I need to convert it to just '14:30'. I've tried everything please help.

我的数据库中有一个时间戳列,日期和时间格式为“24/06/2015 14:30”,但我需要将它转换为“14:30”。我已经尽力了,请帮忙。

1 个解决方案

#1


-1  

Very easy to use, just pass in argument and format: http://php.net/manual/en/class.datetime.php

非常容易使用,只需传入参数和格式:http://php.net/manual/en/class.datetime.php。

#1


-1  

Very easy to use, just pass in argument and format: http://php.net/manual/en/class.datetime.php

非常容易使用,只需传入参数和格式:http://php.net/manual/en/class.datetime.php。