[Edit]: oops
select UNIX_TIMESTAMP(datetime1) - UNIX_TIMESTAMP(datetime2)
this will give you the difference in seconds
if the difference is less than 24 hours, you can then use SEC_TO_TIME to convert the result back to hh:mm:ss format
if it's more than 24 hours, you have to do additional arithmetic