View Full Version : Date Format
09-03-2009, 06:36 AM
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
09-03-2009, 06:38 AM
www.php.net - search date()
09-03-2009, 08: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.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.