Use DATE_FORMAT() in your query to format the MySQL date to whatever
format you want. You can also use UNIX_TIMESTAMP() in your query to
return a Unix timestamp instead of the MySQL format. But if that's all
you want to do is format it a certain way, do it in your query.

Check Chapter 6 of the MySQL manual for Date and Time Functions for
examples...

---John Holmes...

> -----Original Message-----
> From: Peter [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 24, 2002 5:05 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Time/date function MYSQL->UNIX
> 
> 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!
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



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

Reply via email to