#31227 [Opn->Bgs]: date in php
| From: | derick@php.net | Date: | Tue, 21 Dec 2004 10:13:21 +0000 |
| Subject: | #31227 [Opn->Bgs]: date in php | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-70821@lists.php.net to get a copy of this message | ||
ID: 31227
Updated by: derick@php.net
Reported By: bego_xaudaro at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: win xp
PHP Version: Irrelevant
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
.
Previous Comments:
------------------------------------------------------------------------
[2004-12-21 11:10:39] bego_xaudaro at hotmail dot com
Description:
------------
Hello,
i have d-m-yyyy and i want yyyy-mm-dd
example:
i have the date 1-2-2004 and i want 2004-02-01
how i can format the date??
i try with mktime() and list() but the result is incorrect
can anybody help me please?
thanks!
pd: sorry for my english
Reproduce code:
---------------
for example:
$data="1-2-2004";
list( $day, $month, $year ) = split( '-', $alta );
$alta=date("Y-m-d", mktime(0,0,0,$month,$day,$year));
Expected result:
----------------
i expect 2004-02-01
Actual result:
--------------
actual result: 1999-02-01
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31227&edit=1