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:
01323614
Views:
18
Yes, the program is now working and the results are fantastic!

You are correct about the first two case statements having the same code. I combined them as shown below. I also combined the same in the DO CASE for the END times with an OR.
* The cEffectiveStartHour and cEffectiveStartMinute are used for calculations.
DO CASE
   * Employee Clocked In over 15 minutes EARLY, Ex: 05:44, or CLocked OUT LATE, Ex: 06:01.
   CASE iEarlyOrLateMinutes > 15 OR iEarlyOrLateMinutes < 0
      cEffectiveStartHour=cActualStartHour
      cEffectiveStartMinute=cActualStartMinute
   OTHERWISE	&& Employee Clocked In on time. Scheduled Shift Start.
      cEffectiveStartHour=cScheduledStartHour
      cEffectiveStartMinute=cScheduledStartMinute
ENDCASE
cEffectiveStartHour=ALLTRIM(cEffectiveStartHour)
cEffectiveStartMinute=ALLTRIM(cEffectiveStartMinute)

cEffectiveStartTime=;
   PADL(ALLTRIM(cEffectiveStartHour),2,"0")+;
   ':'+PADL(ALLTRIM(cEffectiveStartMinute),2,"0")
>Do you mean to say that it's working now?
>By the way, I notice that in all the three Do-Case constructs the first and second case statements give the same results.
Previous
Reply
Map
View

Click here to load this message in the networking platform