"Peter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is there a built in PHP function which will convert a MySQL type date
> (YYYYDDMM or whatever) into a unix timestamp so it can be used with the
> other PHP time and date functions?
>
> I'm currently using substr() to extract bits of the date so it displays as
> DD / MM / YYYY but it's annoying!


SELECT
    id, UNIX_TIMESTAMP(mydate) AS mydatestamp
FROM mytable

then  $row['mydatestamp'] is your unix timestamp.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to