Hi
I'm working on a way to extract given data from a timestamp in a MySQL. I've been advised to try FROM_UNIXTIME() ... but my development is built around pear::db so I'm looking for a replacement. Have you any suggestions
thankx
Hi
I'm working on a way to extract given data from a timestamp in a MySQL. I've been advised to try FROM_UNIXTIME() ... but my development is built around pear::db so I'm looking for a replacement. Have you any suggestions
thankx
Do you mean a PHP-based solution instead of using SQL? Just use the date()
function to format your timestamp:
date("Y-m-d H:i:s", $timestamp);
Specific answer (see comments): to get just the month from this, just change the format string to "m" and leave out everything else.