Let say we have start date and end date
if (isset($_POST['start_date']))
$_POST['start_date'] = gmdate('Y-m-d H:i:s', strtotime($_POST['start_date']));
if (isset($_POST['end_date']))
$_POST['end_date'] = gmdate('Y-m-d H:i:s', strtotime($_POST['end_date']));
would $_POST['end_date'] - $_POST['start_date'] give you the expired time in seconds?
No, to get the expired time in seconds you would use strtotime():