Jump to content

Format from Mon, 01 Sep 2008 09:48:00 PST to dd/mm/yy


chelnov63

Recommended Posts

Hi Im recieving imformation from an rss feed which has the date in the format:

 

Mon, 01 Sep 2008 09:48:00 PST

 

I needed to convert this into the format dd/mm/yy so the above would look like:

 

01/09/08

 

does php have any built in functions so i can do this? thanks in advance

 

 

 

thanks but i dont think php recognises that format as a date format? It accepts mySQL timestamps fine as I did that earlier on but with:

 

 

$yourvar = "Mon, 01 Sep 2008 09:48:00 PST";
echo date("d/m/y",$yourvar);

 

 

I get the error:

 

Warning: date() expects parameter 2 to be long, string given in C:\htdocs\test.php on line 3

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.