List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 9 1999 7:12pm
Subject:Re: ? how to get seconds between max & min of datetime
View as plain text  
>>>>> "Daniel" == Daniel Koch <dkoch@stripped> writes:

<cut>

>> Any ideas ??  If MySQL can't do this kind of stuff for me,
>> I'll have to store unix timestamps in the database, which
>> will be awful, and will make my port much more difficult
>> between Oracle & MySQL.

Daniel> select unix_timestamp(max(creation)) - unix_timestamp(min(creation)) from
Daniel> hits;

Daniel> However, this seems to prevent MySQL from using indexes, at least in
Daniel> 3.22.22.

Fixed in MySQL 3.23.

Regards,
Monty
Thread
? how to get seconds between max & min of datetimeJoshua Chamas9 Sep
  • Re: ? how to get seconds between max & min of datetimeDaniel Koch9 Sep
    • Re: ? how to get seconds between max & min of datetimeMichael Widenius9 Sep