Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: dan delpuerto
  
 
 
 dan delpuerto
 To: Abdulla Rahiman
  Where is Abdulla Rahiman?
 Dubai
 United Arab Emirates
 Abdulla Rahiman
 Tags
Subject: RE: How to calculate attendance in shiftwise duty
Thread ID: 73523 Message ID: 79064 # Views: 2 # Ratings: 1
Version: Visual FoxPro 8 Category: General VFP Topics
Date: Wednesday, October 12, 2005 4:05:56 PM         
   


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


ENTIRE THREAD

How to calculate attendance in shiftwise duty Posted by Abdulla Rahiman @ 8/1/2005 3:15:22 PM
RE: How to calculate attendance in shiftwise duty Posted by Mike Gagnon @ 8/1/2005 3:50:15 PM
RE: How to calculate attendance in shiftwise duty Posted by Andy Kramek @ 8/2/2005 12:38:38 PM
Thanks to Mr. Andy and Mike Posted by Abdulla Rahiman @ 8/3/2005 8:02:05 AM
RE: How to calculate attendance in shiftwise duty Posted by tom knauf @ 8/3/2005 11:56:27 AM
RE: How to calculate attendance in shiftwise duty Posted by dan delpuerto @ 10/12/2005 4:05:56 PM