0
select employee,
log_type,
DATE_FORMAT(time,"%Y-%m-%d") as "attendance_date",
case when log_type = 'IN' then TIME_FORMAT(ch.time,"%H:%i:%s") end as check_in ,
case when log_type = 'OUT' then TIME_FORMAT(ch.time,"%H:%i:%s") end as check_out
from Employee_checkin ch
where DATE_FORMAT(time,"%Y-%m-%d") = '2023-02-14'

my result is :

HR-EMP-00001 IN 2023-02-14 09:24:24
HR-EMP-00001 OUT 2023-02-14 15:24:40

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.