<?php
include('server.php');

$sql = "select updatedtime from batchschedule where id='1'";
$res=mysqli_query($db, $sql);
$r = mysqli_fetch_assoc($res);


#$pdt = '19-07-2022 05:48:00';
$pdt = $r['updatedtime'];
$cdt= date('d-m-Y H:i:s');

#echo $pdt . "\n";
#echo $cdt . "\n";

$diff = strtotime($cdt) - strtotime($pdt);
echo $diff;

?>
