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:
00885524
Vues:
12

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


You are sure ?
CLEAR
FOR k=1 TO 12
 ? k,QUARTER(DATE(2000,m.k,1)),QuarterX(DATE(2000,m.k,1)),FLOOR((m.k+2)/3)
NEXT

FUNCTION QuarterX

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
Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform