danjen
asked on
Convert RFC822 date format in php
Hi Experts-
I have an xml file with a date in the following format : Sun, 18 Oct 2009 19:00:00 GMT
I want to convert this date to this format 10/18/2009 using PHP.
Thanks for your help.
I have an xml file with a date in the following format : Sun, 18 Oct 2009 19:00:00 GMT
I want to convert this date to this format 10/18/2009 using PHP.
Thanks for your help.
ASKER
It returns the date 12/31/1969 when I use this.
ASKER
Still need help with this. Any experts that can provide additional information?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I figured this out. I was trying to convert the date from an XML file with PHP. I had to parse the XML file first and then use the code provided. Thanks for your help.
echo date("m/d/Y", strtotime("Sun, 18 Oct 2009 19:00:00 GMT"));