shill Posted April 24, 2006 Share Posted April 24, 2006 I’m trying to format the date from my query. Here’s what I’ve got so far.[code]if ($r = mysql_query ($query)) { while ($row = mysql_fetch_array ($r)) { print "<tr><td>{$row['show_date']}</td> <td>{$row['show_city']}, {$row['show_state']} {$row['show_country']}</td> <td>{$row['show_venue']}</td> \n"; }[/code]I think I may need something like this but I’m not sure.[code]$show_date = date("m.d.y");[/code]Thanks for any help. Quote Link to comment https://forums.phpfreaks.com/topic/8285-formating-date-from-mysql-query/ Share on other sites More sharing options...
wildteen88 Posted April 24, 2006 Share Posted April 24, 2006 You'll want to do something like this:[code]$date = date("d.m.y" , strtotime($row['show_date']))[/code] Quote Link to comment https://forums.phpfreaks.com/topic/8285-formating-date-from-mysql-query/#findComment-30233 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.