Re: [PHP-DB] Caculating minutes since DATETIME column?
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:[EMAIL PROTECTED]] >>Sent: Thursday, September 26, 2002 12:29 PM >>To: [EMAIL PROTECTED] >>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 >> >> > > > > >
RE: [PHP-DB] Caculating minutes since DATETIME column?
SELECT UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(your_column) / 60 AS Minutes FROM your_table ---John Holmes... > -Original Message- > From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 12:29 PM > To: [EMAIL PROTECTED] > 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[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