note 68899 added to function.date
| From: | KirillM at osu1 dot php dot net | Date: | Tue, 15 Aug 2006 12:17:29 +0000 |
| Subject: | note 68899 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115933@lists.php.net to get a copy of this message | ||
Here's a really simple function I made for taking the MySQL date format output and converting
to 00.00.0000 (Month-Day-Year) format:
<?php
function reorderDate($inputDate) {
$day = substr($inputDate, 8);
$month = substr($inputDate, 5, -3);
$year = substr($inputDate, 0, 4);
$outputDate = $month.".".$day.".".$year;
return $outputDate;
}
?>
----
Server IP: 64.71.164.2
Probable Submitter: 12.7.137.83
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/68899
Del: integrated -- https://master.php.net/note/delete/68899/integrated
Del: useless -- https://master.php.net/note/delete/68899/useless
Del: bad code -- https://master.php.net/note/delete/68899/bad+code
Del: spam -- https://master.php.net/note/delete/68899/spam
Del: non-english -- https://master.php.net/note/delete/68899/non-english
Del: in docs -- https://master.php.net/note/delete/68899/in+docs
Del: other reasons-- https://master.php.net/note/delete/68899
Reject -- https://master.php.net/note/reject/68899
Search -- https://master.php.net/manage/user-notes.php