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:
00349924
Views:
30
>It doesn't work for december.
>
>Vlad

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

Click here to load this message in the networking platform