note 20205 added to function.strtotime

From: Date: Tue, 26 Mar 2002 16:09:39 +0000
Subject: note 20205 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-28227@lists.php.net to get a copy of this message
Note that this function WILL NOT parse US date format with dashes (m-d-Y) but it WILL parse it with slashes (m/d/Y), so use these functions to move between SQL and US date formats: function usDate2sql($usdate){//m-d-Y --> Y-m-d $usdate=str_replace("-", "/", $usdate); return date("Y-m-d", strtotime($usdate)); } function sqlDate2us($sqldate){//Y-m-d --> m-d-Y return date("m-d-Y", strtotime($sqldate)); } -- http://www.php.net/manual/en/function.strtotime.php http://master.php.net/manage/user-notes.php?action=edit+20205 http://master.php.net/manage/user-notes.php?action=delete+20205 http://master.php.net/manage/user-notes.php?action=reject+20205

« previous php.notes (#28227) next »