I have a table with a time (int 4) where is stored time ex:1506201203
That would be:
year-mo-da-hh-mm
2015-06-20-12-03
I need a php script to get the time and display it correctly ..
A bit of help ?
I have a table with a time (int 4) where is stored time ex:1506201203
That would be:
year-mo-da-hh-mm
2015-06-20-12-03
I need a php script to get the time and display it correctly ..
A bit of help ?
You can use from_unixtime.
FROM_UNIXTIME(column_name, '%Y-%m-%d')
in your MySQL query.
Or you can just use date
function.
date('Y-m-d-h-m', $n['date']).