$FourteenDays = 86400 * 14;
$var = $FourteenDays - (strtotime($date2) - strtotime($date1));
Now if $var is 0, 14 days has not passed.
Niklas
-Original Message-
From: Fredrik [mailto:[EMAIL PROTECTED]
Sent: 12. maaliskuuta 2003 12:06
To: [EMAIL PROTECTED]
Subject: [PHP] date check
Hi Fredik,
I have to dates that i want to check who is biggest.
This does not work:
if( $date1 $date2){
How can i check them?
Presumably they're in SQL format, or something similar?
The easiest way is to convert them to unix timestamps (look into the date()
and mktime()
2 matches
Mail list logo