[thelist] timestamp in mySQL
Seb
seb at poked.org
Mon Jul 28 06:23:28 CDT 2003
On Mon, 28 Jul 2003 13:08:53 +0200, Alexis, Winston Design
<alexis at winstondesign.se> wrote:
> Hi all,
> I have a table in my mysql database with a timestamp column. The format
> for the timestamp is 20030728123921 wich doesn't seem to be the same
> referred to in the PHP manual when referred to Unix timestamp.
> Is there a function to convert my mySQL timestamp to i.e. Monday the
> 28th of July or should I change it all to the Unix timestamp used in the
> PHP manual?
>
> I'm running MySql 4.0.11 and PHP 4.3 on Mac OS X
Try selecting the field using mySQL's UNIX_timestamp(timestampField)
function. You should then be able to use that output with PHP's Date
formatting.
- seb
--
http://poked.org
More information about the thelist
mailing list