Answers for "compare dates in phph"

PHP
7

php compare two dates

$today = date("Y-m-d");
$expire = $row->expireDate; //from database

$today_time = strtotime($today);
$expire_time = strtotime($expire);

if ($expire_time < $today_time) { /* do Something */ }
Posted by: Guest on December-15-2019
2

date comparison function in php

Select if(Date('2020-10-01') > Date('2020-11-01'), '1', '2' ) as rslt_date
Posted by: Guest on December-30-2020

Browse Popular Code Answers by Language