Re: [PHP] Difference between 2 Dates

2002-12-13 Thread vernon
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

Re: [PHP] Difference between 2 Dates

2002-12-13 Thread Jean-Marc Libs
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

Re: [PHP] Difference between 2 Dates

2002-12-13 Thread DL Neil
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

Re: [PHP] Difference between 2 Dates

2002-12-13 Thread Kevin Stone
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 &

Re: [PHP] Difference between 2 Dates

2002-12-13 Thread Colin Bossen
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.

Fw: [PHP] Difference between 2 Dates

2002-12-13 Thread Kevin Stone
- 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

[PHP] Difference between 2 Dates

2002-12-13 Thread vernon
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