rondog Posted November 7, 2008 Share Posted November 7, 2008 I have a date in a table that is formatted like this: 2008-11-07 How can I format it so it looks like 'November 7th, 2008'? I tried date_format but it says its expecting a time..? Link to comment https://forums.phpfreaks.com/topic/131835-solved-how-do-i-format-this-date/ Share on other sites More sharing options...
rondog Posted November 7, 2008 Author Share Posted November 7, 2008 and I tried $date = date("F j, Y",$row['date_added']); and it came out as December 31, 1969 Link to comment https://forums.phpfreaks.com/topic/131835-solved-how-do-i-format-this-date/#findComment-684843 Share on other sites More sharing options...
trq Posted November 7, 2008 Share Posted November 7, 2008 <?php echo date("F jS, Y", strtotime('2008-11-07'); ?> Link to comment https://forums.phpfreaks.com/topic/131835-solved-how-do-i-format-this-date/#findComment-684846 Share on other sites More sharing options...
rondog Posted November 7, 2008 Author Share Posted November 7, 2008 ahh thank you..I missed strtotime..appreciate it Link to comment https://forums.phpfreaks.com/topic/131835-solved-how-do-i-format-this-date/#findComment-684847 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.