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
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.
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
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.