如何将星期四,01二月2018 01:01:12 +0530转换成日期[复制]

This question already has an answer here:

I want to convert in php

how to convert Thu, 01 Feb 2018 01:01:12 +0530 into date
I got This kind of date

Thu, 01 Feb 2018 01:01:12 +0530

How to convert this kind of date into Y-m-d H:i:s format.

</div>

Have a look to DateTime::createFromFormat:

$dt = DateTime::createFromFormat('d M Y h:i:s O', '01 Feb 2018 01:01:12 +0530');
echo $dt->format("Y-m-d H:i:s");

try this

$date = "Thu, 01 Feb 2018 01:01:12 +0530";
echo date("Y-m-d H:i:s",strtotime($date));