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"? 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 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'])); Link to comment https://forums.phpfreaks.com/topic/202490-format-timestamp/#findComment-1061586 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.