Answers for "subtract dates and get number php"

PHP
0

subtract some days php

// First date of the month.
$monthFirstDate = date('Y-m-01', strtotime('today'));

// Last date of the month.
$monthLastDate = date('Y-m-t', strtotime('today'));

// Second last date of the month
$monthLastSecondDate = date('Y-m-d', strtotime('-2 day', strtotime('today')));
Posted by: Guest on September-07-2021
0

php subtract mins to datetime

$datetime_from = date("Y-m-d H:i", strtotime("-45 minutes", strtotime($thestime)));
Posted by: Guest on October-03-2021

Browse Popular Code Answers by Language