[thelist] MySQL 3.x - emulating difftime()

Hassan Schroeder hassan at webtuitive.com
Thu May 20 08:42:48 CDT 2004


David Siedband wrote:

> Is it possible to emulate the functionality of difftime() in MySQL 3.x 
> without using a scripting language?

If the dates in question are Unix-era, why not just

   UNIX_TIMESTAMP(datetime1) - UNIX_TIMESTAMP(datetime2)

<http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html>


Apologies if I've misunderstood the question.
-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.




More information about the thelist mailing list