Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date + 10 business day
Message
 
 
À
07/01/2003 10:05:46
Randy Hooper
Ranco Business Software
Tampa, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00738774
Message ID:
00738781
Vues:
16
>I have a date field that the user key in and base on that date I need to calulate 10 business days from that date. Needs some ideals on this procedures.
>
>Thanks Randy

I just wrote this program from the top of my head.
#define DOW_MONDAY   2
#define DOW_SATURDAY   7
#define DOW_SUNDAY     1
local array laDates[m.NBusinessDays]
i=0
k=0
do while k <= m.NBusinessDays
    i=m.i+1
* -- Check against holiday for each missing record && Sundays & Saturdays
   if dow(m.myDate+m.i)<>DOW_SATURDAY and dow(m.mydate+m.i)<>DOW_SUNDAY ;
      and !seek(m.myDate+m.i,'Holidays')
            ** Business day
       k=m.k+1   
       laDates[m.k] = m.myDate+m.i
   endif
enddo
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform