call escalation based on time


get the allocated date and time

$allot_date_Time=”2014-05-08 08.20 AM”;

get the allocated date


Find ,time how many hours is fished till today

$seconds = strtotime(“$allot_date_Time”) – strtotime(“$allot_date 12.00 AM”);

find remaining year

$days = floor($seconds / 86400);
$seconds %= 86400;

find remaining Hour

$hours = floor($seconds / 3600);
$seconds %= 3600;

find remaining Mini

$minutes = floor($seconds / 60);
$seconds %= 60;
echo “$days days and $hours hours and $minutes minutes and $seconds seconds”;


Calculate the total time taken for call transfer


find and added current and time added maximum allotted time

$timestamp = strtotime(date(“Y-M-d h:iA”, strtotime($date)) . ” + $total_hours hour“);

(Hour or Mini orYyear)

convert into time time format

echo $expired = date(‘Y-M-d h:iA’, $timestamp);



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s