note 7321 deleted from sprintf by ronabop

From: Date: Fri, 11 Aug 2000 18:14:16 +0000
Subject: note 7321 deleted from sprintf by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-1369@lists.php.net to get a copy of this message
This is my function for converting mysql dates into dates to be passed to the php date function...<br> cfunction mysqlDate($date) { <br> &nbsp; &nbsp; ereg("(....)(..)(..)(..)(..)(..)",$date,$reg); <br> &nbsp; &nbsp; return mktime($reg[4],$reg[5],$reg[6],$reg[2],$reg[3],$reg[1]); <br> }<br> <br> echo date("M d Y",mysqlDate($somedb->f('datefield'));<br><br> This is a good function to keep in all your db code..

« previous php.notes (#1369) next »