timgolding
07-23-2007, 04:19 PM
Hi
I have a start time for a schedule and in my DB i have a duration which is a string. What I want to do is calculate the end time
end_time= start_time + (duration)
Start time is stored in the DB as a SQL Time data type. I convert it to a timestamp
$timestamp=strtotime($row['time']);
$strt_time=date("g:i", $timestamp);
So how is the best way to get end time when one is a string in hours and the other a timestamp
I have a start time for a schedule and in my DB i have a duration which is a string. What I want to do is calculate the end time
end_time= start_time + (duration)
Start time is stored in the DB as a SQL Time data type. I convert it to a timestamp
$timestamp=strtotime($row['time']);
$strt_time=date("g:i", $timestamp);
So how is the best way to get end time when one is a string in hours and the other a timestamp