D-Dayve Posted November 30, 2008 Share Posted November 30, 2008 Hello, Right now i am getting the date via an rss feed so the date looks like: Wed, 26 Nov 2008 06:47:52 -0800 I want the date to look like 11/26/2008 i dont even want/care about time and the -0800 part. What would be the best/most efficient php way to convert it? Thanks alot! Link to comment https://forums.phpfreaks.com/topic/134883-convert-rss-date-to-different-date-format/ Share on other sites More sharing options...
rhodesa Posted November 30, 2008 Share Posted November 30, 2008 well...the -0800 is kind of important as it is the timezone offset. but strtotime() can convert it to a timestamp, and then date() can format it: $data = 'Wed, 26 Nov 2008 06:47:52 -0800'; print date('m/d/Y',strtotime($date)); more on date formats here: http://us.php.net/date Link to comment https://forums.phpfreaks.com/topic/134883-convert-rss-date-to-different-date-format/#findComment-702347 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.