Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Counting Days
Message
De
17/10/2000 13:29:46
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00429936
Message ID:
00430421
Vues:
9
>>
>>lnFullWeeks = max(week(date(),1,2),0)
>>lnFirstWeekDays = max(8-dow(date(year(date()),1,1),2) - 2,0)
>>lnThisWeekDays = iif(week(date(),1,2)=1,0,min(dow(date(),2),5))
>>lnWorkDays = lnFullWeeks * 5 + lnFirstWeekDays + lnThisWeekDays

Yes George,
That happens when your fingers type different than your mind thinks.) max() had a purpose there :)

lnFullWeeks = max(week(date(),1,2)-2,0)

Walter, week() function has optional parameters specifying when a week starts and what fdow is.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform