I'm trying to do a mail function where if the date the email was posted was
today then a "new message" would display, otherwise not.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, 13 Dec 2002, Colin Bossen wrote:
> I have a similar problem. I am trying to figure out which of two dates
> is greater. Both are in the -mm-dd format. Is there any easy
> function that allows this sort of comparison or am I missing something?
You have a simpler problem. -mm-dd i
Colin,
> I have a similar problem. I am trying to figure out which of two dates
> is greater. Both are in the -mm-dd format. Is there any easy
> function that allows this sort of comparison or am I missing something?
Treat the dates as strings not numbers:
$DateOne = "2002-12-13";
$DateTw
ts2)
{
// .. blah blah blah.
}
-Kevin
- Original Message -
From: "Colin Bossen" <[EMAIL PROTECTED]>
To: "vernon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 2:50 PM
Subject: Re: [PHP] Difference between 2 Dates
&
I have a similar problem. I am trying to figure out which of two dates
is greater. Both are in the -mm-dd format. Is there any easy
function that allows this sort of comparison or am I missing something?
On Friday, December 13, 2002, at 01:43 PM, vernon wrote:
I found this code on the php.
-
From: "vernon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 12:43 PM
Subject: [PHP] Difference between 2 Dates
> I found this code on the php.net web site but am new to php and can't
figure
> out how to dispaly the difference once
I found this code on the php.net web site but am new to php and can't figure
out how to dispaly the difference once calucuated. Belowis the code I'm
using:
# --- Date Difference ---
#Date 1 from MySQL database recordset row
$date1 = $row_rsMESSAGES['privmsgs_date'];
#Date 2 - now
$date2 = date("ym
7 matches
Mail list logo