I would like to parse this date with php Fri, 27 Jul 2018 06:33:06 +0200 to "27-07-2018 06:33:06" Is there a php function or class that handles this?
Asked
Active
Viewed 39 times
1 Answers
0
DateTime is your friend.
$date = new DateTime('Fri, 27 Jul 2018 06:33:06 +0200');
echo date_format($date,'m-d-Y h:i:s');

Dave
- 5,108
- 16
- 30
- 40