Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Last Day of month
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00349709
Message ID:
00350673
Views:
31
>Hmmm, the other two well known one line formulas (using GOMONTH) look better to me.
>
>Vlad

I agree, but I felt obiliged to fix the "bug".:-)

>>Drat! You're right, of course. Hmm...keeping it as a one liner
lday = DAY(DATE(IIF(lnmonth < 12, lnyear, lnyear + 1), IIF(lnmonth < 12, lnmonth + 1, 1), 1) - 1)
but I'd much rather...
IF lnmonth = 12
>>  lnmonth = 0
>>  lnyear = lnyear + 1
>>ENDIF
>>lnday = DAY(DATE(lnyear, lnmonth + 1, 1) - 1)
for readability purposes.:-)
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform