I show my problem:
I have two variables that contain the TIME variable from an MySQL database:
$row[0] //it contains for instance 16:30:00
$row[1] //it contains for instance 18:00:00
How do I find the term that is derived from their subtraction?
As they are already time variables I tried to do a subtraction directly with these values but I get integer values rounded down.
I tried existing questions but none foresaw a time in the format HH: MM: SS.
Thank you.
try to use
at mysql
Use
TIMEDIFF
function instead of substrction:REPLACE
is used to ensure absolute result.This question was already answerd... well You need to convert it on timestamps
Also be aware if it use after 1 day, it will not show the "last day" difference... So use year month day...