Link to home
Start Free TrialLog in
Avatar of BHUC
BHUCFlag for United States of America

asked on

Add two time variables then add an hour

I'm very frustrated I can't get this to work since it seems so easy.  I have two time variables in my databases
SCHTM and DURATION

I need to add these two together, then add one hour.

I have this adding the two variables correctly and displaying in the format I need:
$TotTime = strToTime($SCHTM) + strToTime($DURATION) - strToTime("00:00:00");  
$TTF= date("H:i", $TotTime);

But whenever I try to add one hour, it messes things up.
ASKER CERTIFIED SOLUTION
Avatar of BHUC
BHUC
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BHUC

ASKER

Found the answer myself before anyone could answer. I knew it was simple....