violinrocker Posted May 21, 2010 Share Posted May 21, 2010 <?php echo $row[date]; ?> i use the code above to get the time and date the content on my pages are uploaded, but it shows the default timestamp... how do i make it to look like "feruary 19, 1992 5:38pm"? Quote Link to comment https://forums.phpfreaks.com/topic/202490-format-timestamp/ Share on other sites More sharing options...
mcdsoftware Posted May 21, 2010 Share Posted May 21, 2010 Assuming from your title that $row['date'] is a valid timestamp, try: echo date('F d, Y h:ia', $row['date']); HTH Quote Link to comment https://forums.phpfreaks.com/topic/202490-format-timestamp/#findComment-1061582 Share on other sites More sharing options...
phpchamps Posted May 21, 2010 Share Posted May 21, 2010 echo date('F d, Y h:ia', strtotime($row['date'])); Quote Link to comment https://forums.phpfreaks.com/topic/202490-format-timestamp/#findComment-1061586 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.