Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php subtract date from today

<?php
$date_raw = 2022-02-17;
$first_date = strtotime($date_raw);
$second_date = strtotime('-1 day', $first_date);

print 'First Date ' . date('Y-m-d', $first_date);
print 'Next Date ' . date('Y-m-d', $second_date);
?>
 
PREVIOUS NEXT
Tagged: #php #subtract #date #today
ADD COMMENT
Topic
Name
2+4 =