Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php compare dates

$date1 = "2021-01-15";
$date2 = "2021-01-18";

if ($date1 < $date2) {
 	echo "$date1 is earlier than $date2";
} else {
	echo "$date1 is later than $date2";
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #compare #dates
ADD COMMENT
Topic
Name
5+7 =