You should consider (include in your database) the following:
1. Date and time logged IN
2. Date and time logged OUT
3. Time must be in military format (such that 3:45PM is 15:45 hours)
in order that conversion of time to minutes is easier
.. and simply calculate the hours worked by:
a. Convert all fields to minutes:
nDayMin = (DateOUT - DateIN) * 24 * 60
nTimeMin = toMin(TimeOUT) - toMin(TimeIN)
*---- use this function for time conversion (example "15:45")
function toMin(cTime)
return val(left(cTime, 2)) * 60 + val(right(cTime, 2))
b. Calculate minutes worked
TotalMinutesWorked = nDayMin + nTimeMin
HrsWorked = int(TotalMinutesWorked / 60)
MinWOrked = TotalMinutesWorked - (HrsWorked * 60)
Good luck.

*> Dear all Experts,*

>

> Can any body halp me how to mark attendance in shiftwise duty.

>

> for Eg.

>

> Duty starts from 7am to 3 pm (Ist Shift)

> 3 pm to 11 pm (2nd shift)

> 11 pm to 7 am(3rd shift)

>

> Here i m facing problem in calculating attendance for 3rd shift,

> bcoz, date is changing in this case, And if someone takes half day leave

> things will become more complexity. anybody have any solution for this?

>

> thanks in advance

>

> Regards

> Abdulla