This question already has an answer here:
这个问题已经有了答案:
- Convert one date format into another in PHP 14 answers
- 在PHP 14中,将一个日期格式转换为另一个日期格式。
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。