I have a database row whose type is "timestamp". It is automatically filled every time a new record is added with the time of making this record. Right now, for one of the entries, it contains the value:
2010-06-19 18:40:51
I tried to include this in a more convenient format:
$timeStamp = $row['date'];
$timeStamp = date( "m/d/Y", $timeStamp);
But he returns this:
12/31/1969
I read somewhere that the date function can only be used on unix timestamps, maybe what I have in my database is not a suitable timestamp, and I need to convert it to the first one before using the date function on it (?), what is the solution?
James source
share