Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number of months between two dates
Message
From
06/11/2002 14:15:49
 
 
To
06/11/2002 14:06:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00719472
Message ID:
00719475
Views:
27
I don't know the simplest way, but this works:
ddate1={12/01/2002}
ddate2={02/15/2003}
lmonthno=0
i=1
FOR i = 1 TO 12
    IF GOMONTH(ddate1,i) <= ddate2
          lmonthno=i
    ELSE
          EXIT
    ENDIF
ENDFOR
? lmonthno
I hope there is a better way!
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform