SELECT UNIX_TIMESTAMP(timestamp2)-UNIX_TIMESTAMP(timestamp1) as
difference from table;
gives you the time in seconds between the 2
SELECT
sec_to_time(UNIX_TIMESTAMP(timestamp2)-UNIX_TIMESTAMP(timestamp1)) as
difference from table;
gives you the time in Days+HH:MM type format
see f
I have two columns in a table, both timestamp(14). The first one holds
a start date and the second one holds an end date. Is there any built
in mysql function to subtrack timestamp1 from timestamp2 and get the
elapsed time between?
Thanks,
Jeff
--
MySQL General Mailing List
For list archives: