Re: note 8525 added to date

From: Date: Fri, 15 Sep 2000 21:16:31 +0000
Subject: Re: note 8525 added to date
Groups: php.notes 
Request: Send a blank email to php-notes+get-5084@lists.php.net to get a copy of this message
Function is irrelevant for MySQL, see UNIX_TIMESTAMP() function in MySQL manual. But it could still be useful for other databases, comment added to your note mentioning this fact. --- jonb@imsa.edu wrote: > Another note for users trying to use a TIMESTAMP > field in mySQL and the date function. I wrote a > small function to convert from mySQL's TIMESTAMP to > a UNIX timestamp (compatible with the date() > function). > > function sql_to_unix_time($timeString) { > return mktime(substr($timeString, 8,2), > substr($timeString, 10,2), substr($timeString, > 12,2), substr($timeString, 4,2), substr($timeString, > 6,2), substr($timeString, 0,4)); > } > > http://www.php.net/manual/function.date.php > > > -- > PHP Notes Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-notes-unsubscribe@lists.php.net > For additional commands, e-mail: > php-notes-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > ===== --- Jesus M. Castagnetto (jcastagnetto@yahoo.com) __________________________________________________ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/

« previous php.notes (#5084) next »