...

View Full Version : Date Format



govind1986
09-03-2009, 07:36 AM
hi friends..,
i want to display the time in my webpage in format dd-mm-yyyy.., hw to change yyyy-mm-dd to dd-mm-yyyy and to display in page

Phil Jackson
09-03-2009, 07:38 AM
www.php.net - search date()

Fou-Lu
09-03-2009, 09:26 AM
The easiest way would be to manually format this:


$sDate = '2009-09-02';
$sDate = vsprintf('%3$s-%s-%1$s', explode('-', $sDate));


Unless of course you want it to say Septemer 2, 2009 instead, in which case using date with either a strtotime or mktime and explodes is the route to go.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum