Node is saved as draft in My Content >> Draft
-
Find duratin between two times of same date
If we have to find duration or difference between two times of same date then
Let we have $dtime and $atime as two times of same date then
$dep=EXPLODE(':',$dtime);
$arr=EXPLODE(':',$atime);
$diff=ABS(MKTIME($dep[0],$dep[1],0,DATE('n'),DATE('j'),DATE('y'))-MKTIME($arr[0],$arr[1],0,DATE('n'),DATE('j'),DATE('y')));
$hours=FLOOR($diff/(60*60));
$mins=FLOOR(($diff-($hours*60*60))/(60));
$secs=FLOOR(($diff-(($hours*60*60)+($mins*60))));
IF(STRLEN($hours)<1){$hours="";}
IF(STRLEN($mins)<2){$mins="";}else{$mins=$mins;}
IF(STRLEN($secs)<2){$secs="";}else{$secs=$secs;}
echo $duration =$hours.'hours '.$mins.'minutes'.$secs."seconds";
Here duration will give the time duration in hours,minutes and seconds
0 Comment(s)