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.
Asked
Active
Viewed 1,525 times
0
-
`$test = explode(" ",$date);echo $test[1];` – Hackerman Jun 24 '15 at 14:01
-
I've tred the following code in many different ways and $time always comes up blank. $stamp = $row['Timestamp']; $time = strtotime($stamp); – Shane Buckley Jun 24 '15 at 14:01
-
Timestamp column in database is not formatted. It is just timestamp. Show how you convert timestamp to String and someone tell you how to get expected formatting – michaldo Jun 24 '15 at 14:03
1 Answers
0
Very easy to use, just pass in argument and format: http://php.net/manual/en/class.datetime.php

Siim Kallari
- 851
- 6
- 17