Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does anyone know of a week() function for FoxPro 2.6
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00150137
Message ID:
00150152
Vues:
20
>>In VFP there is a week() function that allows you to pass it a date and it returns the week number. Has anyone written or does anyone know of such a function that can be used in FP2.6? I don't have premiere membership yet so I can't search the files section. Can anyone help ?
>>
>>TIA
>
>Hi Simon,
>
>The answer to this depends on how you define "week number", but I'd start by doing something like:
>ldJan1 = CTOD("1/1/" + TRANSFORM(YEAR(DATE()), "####"))
>lnweek = (DATE() - ldJan1) / 7
>Now if you want to bump any remainer up, look at the CEILING() function.
>
>hth,

Thanks George, I had started to play around with something similar. I just wondered if anyone had already written the equivalent of the VFP version. In the mean time I will start your idea and see if it will fit my needs. Thanks again.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform