Re: DateTime Calculations

2002-12-04 Thread Keith C. Ivey
On 3 Dec 2002, at 10:45, Peter Abilla wrote: > Column One Column Two > 1999-09-17 16:30:18 1999-09-18 13:30:18 > > I want to calculate the minutes like > > (Column Two - Column One) = Total Minutes Something like ( UNIX_TIMESTAMP(column2) - UNIX_TIMESTAMP(column1) ) / 60 ? > K

Re: DateTime Calculations

2002-12-03 Thread Jeff Kilbride
, 2002 8:45 AM Subject: DateTime Calculations > Suppose I have a datetime in the following format: > > Column One Column Two > 1999-09-17 16:30:18 1999-09-18 13:30:18 > > I want to calculate the minutes like > > (Column Two - Column One) = Total Minutes >

Re: DateTime Calculations

2002-12-03 Thread Pablo
On 12/3/02 10:45 AM, Peter Abilla ([EMAIL PROTECTED]) wrote: > Suppose I have a datetime in the following format: > > Column One Column Two > 1999-09-17 16:30:18 1999-09-18 13:30:18 > > I want to calculate the minutes like > > (Column Two - Column One) = Total Minutes > > I've

Re: DateTime Calculations

2002-12-03 Thread Steve Yates
On Tue, 03 Dec 2002 10:45:57 -0600, Peter Abilla wrote: >(Column Two - Column One) = Total Minutes Assuming this doesn't work :) perhaps select UNIX_TIMESTAMP(col2) - UNIX_TIMESTAMP(col1) as TimeDiff This should give you an answer in seconds. [sql] - Steve Yates - File not found. S

Re: DateTime Calculations

2002-12-03 Thread Cory Hicks
Peter, I would do something like this: (UNIX_TIMESTAMP(Column Two) - UNIX_TIMESTAMP(Column One))/3600 to give you the hoursnot sure about the minutes, but this should get you going! HTH, Cory '$valid_user' "; On Tue, 2002-12-03 at 10:45, Peter Abilla wrote: > Suppose I h

Re: DateTime Calculations

2002-12-03 Thread Rodney Broom
From: Peter Abilla <[EMAIL PROTECTED]> > (Column Two - Column One) = Total Minutes This is quite a hack, and there's probably a better way. But it works: SELECT ROUND( (unix_timestamp(column_one) - unix_timestamp(column_two)) /60 ) as my_minutes; > I've scoured the mysql site and haven't f

DateTime Calculations

2002-12-03 Thread Peter Abilla
Suppose I have a datetime in the following format: Column One Column Two 1999-09-17 16:30:18 1999-09-18 13:30:18 I want to calculate the minutes like (Column Two - Column One) = Total Minutes I've scoured the mysql site and haven't found something that addresses this. Any ideas