note 36964 added to function.strtotime

From: Date: Wed, 29 Oct 2003 03:09:01 +0000
Subject: note 36964 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-59452@lists.php.net to get a copy of this message
I was trying to get a date from mySQL that was before 1st January 1970 (a birthdate) juste like <b>kemps at free dot fr</b>. MySQL accepted the date very well in the query and it did work OK. PHP can print the string of the date, but I've got a big bug when I wanted to strtotime() the date. The solution I've got is to format the date in the SQL query: SELECT TbPersonnes.*, YEAR(DateNaissance) AS Annee, MONTH(DateNaissance) AS Mois, DAYOFMONTH(DateNaissance) AS Jour FROM TbPersonnes WHERE NoPersonne = 5 So, like this, you can create a date in 3 fields....it's a little bit simple and I think it suck that PHP doesn't support date before the 1st January 1970. So that's all ! ---- Manual Page -- http://www.php.net/manual/en/function.strtotime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36964 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36964&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36964&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#59452) next »