Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quarter() in FPD
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00885291
Message ID:
00885524
Views:
11

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
Previous
Reply
Map
View

Click here to load this message in the networking platform