RE: [PHP] Subtracting two dates

2003-03-11 Thread Ben C.
] Subject: Re: [PHP] Subtracting two dates ? $otherDate = 2003-11-15; // -mm-dd format $otherDateStamp = strtotime($otherDate);// now a unix timestamp $difference = time() - $otherDateStamp; // diff in seconds ? Then you need to decide if you want to show days, or hours

Re: [PHP] Subtracting two dates

2003-03-11 Thread Justin French
:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 8:27 PM To: Ben C.; [EMAIL PROTECTED] Subject: Re: [PHP] Subtracting two dates ? $otherDate = 2003-11-15; // -mm-dd format $otherDateStamp = strtotime($otherDate);// now a unix timestamp $difference = time

Re: [PHP] Subtracting two dates

2003-03-11 Thread Justin French
on 12/03/03 4:35 PM, Justin French ([EMAIL PROTECTED]) wrote: if you want to round ALL decimals up, then you might have to create something from scratch, but Actually, there's a link to both ceil() and floor() on the round() page in the manual. Justin -- PHP General Mailing List

Re: [PHP] Subtracting two dates

2003-03-11 Thread Leo Spalteholz
On March 11, 2003 09:35 pm, Justin French wrote: READ THE F***ING MANUAL!!! http://php.net/round clearly shows you how to round to a whole number. if you want to round ALL decimals up, then you might have to create something from scratch, but ceiling and floor functions are part of nearly

[PHP] Subtracting two dates

2003-03-10 Thread Ben C.
There are a lot of artlicles on this but I need a simple solution. I need to subtract two dates as follows: $date = date(Y-m-d); $date1 = 2003-03-03; $differencedate = ($date - $date1); echo $differencedate; When I do this I get 0. Please help!

Re: [PHP] Subtracting two dates

2003-03-10 Thread Justin French
? $otherDate = 2003-11-15; // -mm-dd format $otherDateStamp = strtotime($otherDate);// now a unix timestamp $difference = time() - $otherDateStamp; // diff in seconds ? Then you need to decide if you want to show days, or hours, or years difference... I'll show you

RE: [PHP] Subtracting two dates

2003-03-10 Thread Ben C.
Thanks, Justin. It works. -Original Message- From: Justin French [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 8:27 PM To: Ben C.; [EMAIL PROTECTED] Subject: Re: [PHP] Subtracting two dates ? $otherDate = 2003-11-15; // -mm-dd format $otherDateStamp

Re: [PHP] Subtracting two dates

2003-03-10 Thread Justin French
on 11/03/03 5:04 PM, Ben C. ([EMAIL PROTECTED]) wrote: Thanks, Justin. It works. Of course it does :P HTH Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php