Page 1 of 1

finding the average of timestamps

Posted: Thu Nov 20, 2003 11:18 am
by lobo78
How could I find the average of multiple timestamps? How about the average of time types? which would be easier?

Re: finding the average of timestamps

Posted: Thu Nov 20, 2003 11:45 am
by Weirdan
lobo78 wrote:How could I find the average of multiple timestamps?

Convert them to unix timestamp ([mysql_man]unix_timestamp[/mysql_man]), then compute the average, then convert the average back to the timestamp([mysql_man]from_unixtime[/mysql_man])
lobo78 wrote: How about the average of time types? which would be easier?
Doesn't make any difference whether you use timestamp or time types.

Posted: Thu Nov 20, 2003 2:04 pm
by lobo78
that's a good idea, thanks!