Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time Card Processing
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01323531
Message ID:
01323548
Views:
14
I haven't studied your code, but how is the time stored? If you use datetime fields, this should be extremely easy.

When I typed in Bjørn Stokke in the Norwegian telephone directory, I found 299 persons with that name Do you have any address or more info about him?

>I have tried that also, and end up with weird results; sometimes this puts the worked hours ahead by 1 or behind by 1. See the below code:
>By the way, I wonder if you've ever heard of my Norwegian friend, Bjorn Stokke? He was the Captain of his Ship (Military SeaLift Command) several years back; I met him during the Operation Desert Shield/Desert Storm timeframe (1990-1991).
>
>
>* Convert the END HOUR and END MINUTE into END MINUTES.
>iActualEndMinutes=(60 * VAL(cActualEndHour)) + VAL(cActualEndMinute)
>
>* Convert the Effective START HOUR and Effective START MINUTE into Effective Start Minutes.
>iEffectiveStartMinutes = (60 * VAL(cEffectiveStartHour)) + VAL(cEffectiveStartMinute)
>iTotalEffectiveMinutes=(iActualEndMinutes - iEffectiveStartMinutes)
>iActualShiftHours=(iTotalEffectiveMinutes/60)
>iTotalActualShiftHours=INT(iActualShiftHours)
>cScheduledEndHour=STR(VAL(cEffectiveStartHour) + iTotalActualShiftHours)
>cScheduledEndMinute=cScheduledStartMinute
>* Check the 24 hour time and correct it, if necessary.
>cScheduledEndHour=;
>	IIF(VAL(cScheduledEndHour)>23,STR(VAL(cScheduledEndHour)-24),cScheduledEndHour)
>iScheduledEndMinutes=(60 * VAL(cScheduledEndHour)) + VAL(cScheduledEndMinute)
>iEarlyOrLateMinutes=(iScheduledEndMinutes - iActualEndMinutes)
>
>
>
>>Instead of adding 8 hours, add the appropriate number of hours, taken from the empoyee's data.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform