php time format to timestamp code example
Example 1: php datetime to timestamp
$time = '2021-03-31 23:59:00';
strtotime($time);
Example 2: php mysql timestamp format
date("Y-m-d H:i:s", strtotime($_POST['timestamp']));
$time = '2021-03-31 23:59:00';
strtotime($time);
date("Y-m-d H:i:s", strtotime($_POST['timestamp']));