Re: Date
| From: | JSheble | Date: | Wed, 12 Dec 2001 22:37:35 +0000 |
| Subject: | Re: Date | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-77508@lists.php.net to get a copy of this message | ||
you could use the mySQL DATE_FORMAT() directly in your query:
SELECT DATE_FORMAT( mydatefield, '%m/%d/%Y ' ) as d_mydatefield from MyTable
At 11:23 PM 12/12/2001 +0100, you wrote:
Hi to all, I'm using this to get date from mySQL database: .. $p_datum = $row["mydatefield"]; $mydate = getdate($p_datum); $month = $mydate['month']; $mday = $mydate['mday']; $year = $mydate['year']; .but I allways get 1/1/1970. Can anybody help me? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net