Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with this code
Message
From
05/11/2004 12:20:03
 
 
To
05/11/2004 11:53:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows '98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00958554
Message ID:
00958567
Views:
18
Try this:
IF UPPER(tablest.dia)$ "MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY" 
   IF BETWEEN(HOUR(tablest.finicio), 8, 17)
      XLSheet.Cells(i+1,21).value =  "5x8"  &&tablest.jornada
   ELSE
      XLSheet.Cells(i+1,21).value =  "7x14"
   ENDIF
ELSE
   XLSheet.Cells(i+1,21).value =  "7x24"   
ENDIF
>with this code i'm trying to do the next thing:
>I need to determinate the work day(monday, tuestay, wednesday, thursday and wednesday) and the labour time from 8 am to 5 pm, if so, place in excel "5x8" but if not i have to place "7x24".
>i have to determinate the weekend (Sunday and Saturdays) and place the "7x24" in excel.
>
>But it doesn't work at all, can you help me to check it out?
>Thanks
>
>
>  if  upper(tablest.dia)="MONDAY" OR upper(tablest.dia)="TUESDAY" OR upper(tablest.dia)="WEDNESDA" OR upper(tablest.dia)="THURSDAY" OR UPPER(tablest.dia)="FRIDAY" then
>         if hour(tablest.finicio)>=8 and hour(tablest.finicio)<17 then
>          XLSheet.Cells(i+1,21).value =  "5x8"  &&tablest.jornada
>         endif
>       ELSE
>       *if UPPER(tablest.dia)="SATURDAY" or UPPER(tablest.dia)="SUNDAY" then
>	         if hour(tablest.finicio)>=8 and hour(tablest.finicio)<17 then
>	            XLSheet.Cells(i+1,21).value =  "7x24"
>	         endif
>        *  else
>             if (hour(tablest.finicio)>=17 and hour(tablest.finicio)<0) or (hour(tablest.finicio)>=0 and hour(tablest.finicio)<8) then
>	            XLSheet.Cells(i+1,21).value =  "7x24"
>	         endif
>       endif
>
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform