function absen_skr(){
$query=$this->db->query("SELECT
nik, first_name, CAST(scan_date as DATE) AS tanggal,
CAST(MIN(scan_date) AS TIME) AS
jam_masuk ,
CAST(MAX(scan_date) AS TIME) AS
jam_pulang ,
TIMEDIFF(MAX(scan_date) ,
MIN(scan_date)) AS durasi
FROM `att_log` JOIN emp ON
emp.nik=att_log.pin
WHERE CAST(scan_date AS DATE) <=
CURDATE()
AND CAST(scan_date AS DATE) >=
CURDATE()
GROUP BY CAST(scan_date AS DATE),
nik ");
return $query->result();
}
tanggal hari ini=> CURDATE()
This comment has been removed by the author.
ReplyDelete