Quick timestamp formatting question....
Posted: Fri Jul 18, 2003 9:04 am
Its friday, my brain is frazzled and I can't figure this out:
I'm calling a timestamp(14) out of a mysql database (along with the rest of the contents of that table incase it makes a difference) and want to format it into a user friendly date.
I've tried using date("dmy", $row['test_date']) but it returned some date in January 2038 instead of the correct date which I presume is to do with seconds since the epoch instead.
Next I tried to format it as I selected it from the database in date_format('test_date', '%W %D %M %Y') but then I don't seem to be able to refer to it in the results array, not even as $row[0].
Its a linux server by the way.
Can anyone shed some light? It's supposed to be so simple!!!
My tired brain thanks you all in advance!
I'm calling a timestamp(14) out of a mysql database (along with the rest of the contents of that table incase it makes a difference) and want to format it into a user friendly date.
I've tried using date("dmy", $row['test_date']) but it returned some date in January 2038 instead of the correct date which I presume is to do with seconds since the epoch instead.
Next I tried to format it as I selected it from the database in date_format('test_date', '%W %D %M %Y') but then I don't seem to be able to refer to it in the results array, not even as $row[0].
Its a linux server by the way.
Can anyone shed some light? It's supposed to be so simple!!!
My tired brain thanks you all in advance!