note 36815 added to function.printf

From: Date: Thu, 23 Oct 2003 15:23:40 +0000
Subject: note 36815 added to function.printf
Groups: php.notes 
Request: Send a blank email to php-notes+get-59170@lists.php.net to get a copy of this message
function conv_mysql_date($ts) { if (strpos($ts,"/")>0) { list($dia,$mes,$ano) = explode("/",$ts); return sprintf("%04d-%02d-%02d",$ano,$mes,$dia); } else if (strpos($ts,"-")>0) { list($dia,$mes,$ano) = explode("-",$ts); return sprintf("%04d-%02d-%02d",$ano,$mes,$dia); } else { return "0000-00-00"; } } ---- Manual Page -- http://www.php.net/manual/en/function.printf.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36815 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36815&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36815&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#59170) next »