CanMan2004 Posted June 1, 2006 Share Posted June 1, 2006 Hi allI have a coloum in my db called "expires" whichb stores a date stamp in the formatYYYY-MM-DDI then print this date using<? print $rows['expires'];?>when I print the above, it prints an output like2006-01-04how can I get php to format the date and display it as04-01-2006so its printing in the formatDD-MM-YYYYCan anyone help?Thanks in advanceEd Quote Link to comment https://forums.phpfreaks.com/topic/10943-php-date-format/ Share on other sites More sharing options...
litebearer Posted June 1, 2006 Share Posted June 1, 2006 look at this thread[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=71665\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=71665[/a]Lite... Quote Link to comment https://forums.phpfreaks.com/topic/10943-php-date-format/#findComment-40869 Share on other sites More sharing options...
localhost Posted June 1, 2006 Share Posted June 1, 2006 Well, date can be done in many different ways....d = day m = month y = yearecho date('m/d/y'); = 6/1/06echo date('m/d/Y'); = 6/1/2006 Quote Link to comment https://forums.phpfreaks.com/topic/10943-php-date-format/#findComment-40880 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.