Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quarter() in FPD
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00885291
Message ID:
00885331
Vues:
15
>Thanks a lot, George.

You're welcome, Ramil. I also did some stuff with fiscal months, quarters and years in FPD/FPW. I found that the easiest (and most flexible) solution there was to create a table of months with beginning and ending dates.

>>>Hi all,
>>>
>>>I've been doing some maintenance for our FPD app and needed an equivalent QUARTER() function. I was hoping that someone can share their user-defined function if they have one.
>>>
>>>Thanks in advance.
>>
>>Using the normal calendar rather than a fiscal one.
FUNCTION Quarter
>>
>>PARAMETER tdDate
>>
>>PRIVATE m.result
>>m.result = CEILING(MONTH(tdDate) / 4)
>>IF MONTH(tdDate) % 4 = 0
>>  m.result = m.result + 1
>>ENDIF
>>RETURN m.result
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform