$sql = "SELECT Userid, CheckTime FROM Checkinout WHERE cast(datetime_field as CheckType) = cast(getdate() as '2020-06-18') ";
$stmt = sqlsrv_query($conn_anviz, $sql);
while($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)){
$Userid = iconv("windows-1251", "UTF-8", $row['Userid']);
$CheckTime = iconv("windows-1251", "UTF-8", $row['CheckTime']->date);
?>
<pre>
<?php
echo $Userid . " || ".$CheckTime;
?>
</pre>
<?php
}