SELECT SUM(DATEDIFF(hour, actual_card_in_ time, actual_card_out_time)) FROM YourTable WHERE ...
select min(logintime) from table where logindate = GetDate()
select max(logintime) from table where logindate = GetDate()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)