Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time clock

Status
Not open for further replies.

tilltek

Programmer
Mar 8, 2001
298
PH
Does anyone have, or know where I can get a bit of code that would allow me to add a employee time clock into a FPD26 program? I simply need to have staff sign on and sign off.
Any help would be appreciated.
Ken F
 
Hi Ken,

I suggest you start in VFP. That will make your life much simpler. Becuase.. forget all reasons to get in that one... but this one reason is compelling..
VFP has DateTime type field and variable. So you can easily capture In time and Out time in a Datetime type field, and easily find the time worked DT2-DT1 though that is in seconds. In FPD when I developed a similar one, I remember, I had to compute the time difference with so much work and associate the date() also or else the results will pull you down some where. Example.. SOme one forgetting to puch Out and puches only In.. or having 10PM log-in and 4 AM logout and all sorts of combinations. When thought out in VFP, all these were easily handled because of DateTime field.

Even if your payroll or other stuff is in FP, you can make this part in VFP and then create suitable FP comatible table with results.
:)
:)

ramani :)
(Subramanian.G)
 
It has to run on dos only machines. No Windows.
Ken F
 
Tilltek,
simply count seconds after Christ,
val(sys(11,date()))*86400 + seconds()
for both sign on and off,
and difference is employee time in seconds...
Tesar
 
See thread184-656586 from the Visual Fox forum.
Tortured Mind's post might help you.
 
Sorry people, I'm speaking Australian.
A Time Clock is the machine you clock on at work with and clock off when you finish, often with a card which the machine stamps. The report is used at the end of the week to make up wages.
Ken F
 
I do not think that people are mis-understanding your need - merely providing you with suggestions on how to calculate the difference between StartTime and EndTime.

Remember that the non-graphic (character only) DOS and FPD will have difficulty displaying something that actually looks like a Time Clock.

An alternative to using an actual Clock appearing screen, if you create a Login Screen to identify the user to the application and capture the StartTime and also have a routine within the Exit of your program to capture the EndTime, then you can use the above mentioned routines to calcluate and store the total time for wage calculation.

If you want you could create a Logout screen also, but if people forgot (?) to use it, you would not get the EndTime.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top