Answers for "convert string less than 2 years to date php"

PHP
0

string date less than now php

<?php

    $date_now = time(); //current timestamp
    $date_convert = strtotime('2022-08-01');

    if ($date_now > $date_convert) {
        echo 'greater than';
    } else {
        echo 'Less than';
    }

?>
Posted by: Guest on September-23-2021

Browse Popular Code Answers by Language