mercredi 20 décembre 2017

How to calculate between hours from current date to pickupdate in Laravel

How to calculate between hours from current date to pickupdate. I have pickup date and pickup Time from Input. below function returns wrong value.

$bookingtime=strtotime($request->input('pickupdate_submit')." ".$request->input('pickuptime_submit') );

        $curentdate=date('Y-m-d HH:i');
        $curenttime=strtotime($curentdate);

        $betweenhours = abs($bookingtime - $curenttime) / 3600;



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire