Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compute vacation
Message
From
04/10/2004 06:16:48
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00948387
Message ID:
00948394
Views:
16
hi,
thank you very much,

but i don't know how i can use it at myform.

can i change code as under
*thisform.text1.value=startdate
*thisform.text2.value=enddate
thisform.text3.value=CalculateDays(thisform.text1.value,thisform.text2.value)


FUNCTION CalculateDays(thisform.text1.value, thisform.text2.value)
  LOCAL cycle, tocycle, testdate, ret_val
  ret_val = 0
  tocycle = enddate-startdate
  FOR cycle = 0 TO tocycle
      testdate = thisform.text1.value+cycle
      IF .NOT. INLIST(DOW(ScanDay,1), 6, 7)  && friday, saturday
         ret_val = ret_val + 1
      ENDIF
  ENDFOR

RETURN ret_val
thanks,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform