Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ignoring days
Message
 
To
06/04/2006 15:03:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01110880
Message ID:
01111178
Views:
14
Ship_date      = date() - 4
Order_Date     = date() - 6
lnWeeks        = INT((Ship_date - Order_Date) / 7)
lcThisWeekDay  = Order_Date + lnWeeks*7
lcFullWeekDays = lnWeeks*5

IF WEEK(Ship_date,1,2) > WEEK(lcThisWeekDay,1,2)
   WAIT WINDOW lcFullWeekDays + (Ship_date - lcThisWeekDay - 2)
ELSE
   WAIT WINDOW (Ship_date - lcThisWeekDay - IIF(TRANSFORM(DOW(Ship_date,2)) $ [67],DOW(Ship_date,2)-5, 0)) + lcFullWeekDays
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