Re: Caculating minutes since DATETIME column?

From: Date: Thu, 26 Sep 2002 19:35:19 +0000
Subject: Re: Caculating minutes since DATETIME column?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-22000@lists.php.net to get a copy of this message
Thanks a lot for your help, but just a not to anuyone else who tries this. Since there's no ()s around UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(your_column) , it thinks that you're trying to get: UNIX_TIMESTAMP(NOW()) - (UNIX_TIMESTAMP(your_column) /60) Instead of: (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(your_column)) / 60 John Holmes wrote:
SELECT UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(your_column) / 60 AS Minutes FROM your_table ---John Holmes...
-----Original Message----- From: Leif K-Brooks [mailto:eurleif@buyer-brokerage.com] Sent: Thursday, September 26, 2002 12:29 PM To: php-db@lists.php.net Subject: [PHP-DB] Caculating minutes since DATETIME column? I need a way to calculate the number of minutes since the value of a DATETIME column in mysql. Any ideas? Thanks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.db (#22000) next »