Posted by Kim Andrι Akerψ on 10/06/06 15:26
Pankaj wrote:
> I have fetched date from mysql database which I get in yyyy-mm-dd
> format. I am able to change this to dd-mm-yyyy (eg 06-12-2006). How
> can I display this in dd-mmm-yyyy format (6th Dec 2006)
How about this?
$mysqldate = "2006-09-01";
echo date("jS M Y",strtotime($mysqldate));
The above code will display the given date as:
1st Sep 2006
http://no2.php.net/date
--
Kim AndrΓ© AkerΓΈ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Navigation:
[Reply to this message]
|