In this article, we will learn how to Subtract hours from the current Date Time In Php?
Example
<?php
$date = date('Y-m-d H:i:s', strtotime('-2 hour'));
echo $date;
?>
Output:
2021-01-26 11:57:11
In this article, we will learn how to Subtract hours from the current Date Time In Php?
Example
<?php
$date = date('Y-m-d H:i:s', strtotime('-2 hour'));
echo $date;
?>
Output:
2021-01-26 11:57:11