RE: [PHP] Time/date function MYSQL->UNIX

From: Date: Fri, 24 May 2002 21:12:34 +0000
Subject: RE: [PHP] Time/date function MYSQL->UNIX
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-99157@lists.php.net to get a copy of this message
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:newsaddress@saracenvsu.org.uk] > Sent: Friday, May 24, 2002 5:05 PM > To: php-general@lists.php.net > 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

« previous php.general (#99157) next »