$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 ch
Hi
I want to check if $var > 14 days or $var < 14 days
($var = $date2 - $date1)
$date1 = "2003-01-16";
$date2 = "2003-03-16";
How can i check this?
Are there any functions for this or do i have to make one?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:
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() f
Hi
I have to dates that i want to check who is biggest.
This does not work:
if( $date1 > $date2){
How can i check them?
Svein Olai
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
4 matches
Mail list logo