php date pattern code example
Example 1: date time format php
$today = date("F j, Y, g:i a"); // March 10, 2001, 5:16 pm
Example 2: php date
$dateTime = new \DateTime();
/**
* You can get the string by using format
*/
$dateTime->format('Y-m-d H:i:s');