I have string value for date as "Wed, 25 Apr 2012 23:17:06 -0400"
I want to convert it into Date value
p.s : I'm using php 5.2.
I have string value for date as "Wed, 25 Apr 2012 23:17:06 -0400"
I want to convert it into Date value
p.s : I'm using php 5.2.
try this
$str = "Wed, 25 Apr 2012 23:17:06 -0400";
$date = date("Y-m-d",strtotime($str));