I want to convert "20200823T203851.000Z"
this date format into a readable format using PHP in a Laravel controller. I tried date()
and it returns "20200823UTC203851.0000"
as result, strtotime()
does not seem to work.
public function index() {
$allCards = $this->getCardInfo();
$clanInfo = $this->getClanInfo();
$dateTime = $clanInfo->memberList[0]->lastSeen;
//data stored on dateTime = '20200823T203851.000Z'
//Required in readable format
return view( 'claninfo', compact( ['allCards', 'clanInfo'] ) );
}