Re: Has anyone written such a function?

From: Date: Sat, 30 Mar 2002 18:28:40 +0000
Subject: Re: Has anyone written such a function?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-90797@lists.php.net to get a copy of this message
(shrug) convert to unixtime, subtract, and reformat In fact, you could do the conversion and subtraction in your SQL query, returning just 'elapsed seconds since date', and reformat from there. > I need a function that will get a date in the past and return how much > time has passed since that date till now. > The input to the function is a MySQL DATETIME format and the output > should be something like : > > 2 Years, 36 Days, 7 hours , 25 minutes > > I would write it but I'm pretty sure it has been done.

« previous php.general (#90797) next »