note 76415 added to function.date-format
| From: | muthuishere at gmail dot com | Date: | Sat, 14 Jul 2007 00:55:12 +0000 |
| Subject: | note 76415 added to function.date-format | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128511@lists.php.net to get a copy of this message | ||
You can format Date by using the below function
This function will be helpful for formatting the date after obtaining the date from MYSQL , or if
you need to display the user a formatted date...
function Formatdate($rawdate,$format){
/*
$rawdate - The Date which should be formatted...
$format - The format string....
refer the Date function for format String
*/
$dateTime = new DateTime($rawdate);
$formatted_date=date_format ( $dateTime, $format );
return $formatted_date;
}
----
Server IP: 194.153.94.10
Probable Submitter: 58.171.121.169
----
Manual Page -- http://www.php.net/manual/en/function.date-format.php
Edit -- https://master.php.net/note/edit/76415
Del: integrated -- https://master.php.net/note/delete/76415/integrated
Del: useless -- https://master.php.net/note/delete/76415/useless
Del: bad code -- https://master.php.net/note/delete/76415/bad+code
Del: spam -- https://master.php.net/note/delete/76415/spam
Del: non-english -- https://master.php.net/note/delete/76415/non-english
Del: in docs -- https://master.php.net/note/delete/76415/in+docs
Del: other reasons-- https://master.php.net/note/delete/76415
Reject -- https://master.php.net/note/reject/76415
Search -- https://master.php.net/manage/user-notes.php