note 98950 modified in function.microtime by danbrown
| From: | danbrown@php.net | Date: | Sat, 17 Jul 2010 16:33:53 +0000 |
| Subject: | note 98950 modified in function.microtime by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-170939@lists.php.net to get a copy of this message | ||
Convert date type MySQL to Brazilian (i.e: 2010-07-23 to 23/07/2010);
<?php
$date_brazilian = date("Y-m-d",microtime($_REQUEST[data_inicial]));
?>
The var $_REQUEST[data_inicial] = 23/07/2010 and convert to microtime (Unix TimeStamp) and the
function date convert to format "Y-m-d".
Léo
--was--
Convert date type MySQL to Brazilian (i.e: 2010-07-23 to 23/07/2010);
$date_brazilian = date("Y-m-d",microtime($_REQUEST[data_inicial]));
The var $_REQUEST[data_inicial] = 23/07/2010 and convert to microtime (Unix TimeStamp) and the
function date convert to format "Y-m-d".
Léo
http://php.net/manual/en/function.microtime.php