Re: [PHP] Is there a function to subtract dates

2001-01-12 Thread Rasmus Lerdorf
Just subtract the Unix timestamps. ie. $past_date = mktime(12,45,0,5,6,1994); $diff = time() - $past_date; $days = $diff/86400; // number of seconds in a day echo (int)$days; // truncate to an integer -Rasmus On 12 Jan 2001, Matthew Brealey wrote: > I need to find the num

[PHP] Is there a function to subtract dates

2001-01-12 Thread Matthew Brealey
I need to find the number of days between a date in the past and todays date. Does PHP have a function to do this, or do I need to write my own? -- Random (non-anti-Microsoft) fortune -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c