Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weeks worked between two dates
Message
De
05/12/2007 14:19:38
Mike Yearwood
Toronto, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01273137
Message ID:
01273377
Vues:
14
>Hi Mike,
>
>You can calculate a calendar week from any arbitrary date. For example
>
>ldSunday = {^2000/01/02}
>lnWeek = INT((ldDate - ldSunday) / 7) + 1
>
Yes! That should work very nicely. Thanks again!

>
>
>>
>>Without resorting to some looping code, I'm trying to meet a business rule. If a person works different shifts in a single calendar week, they pay dues once for that calendar week.
>>
>>
>>Start        End
>>2007-12-02 2007-12-02 <- 2007 week 49 to 2007 week 49
>>2007-12-04 2008-01-02 <- 2007 week 49 to 2008 week 1
>>
>>So I want to include only the second record because the 1st week is already accounted for in the second record.
>>
>>Further, is there no way to express weeks as a number that spans several years to simplify subtraction?
>>
>>Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform