Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Last day of a month
Message
From
05/11/1999 11:40:48
 
 
To
04/11/1999 20:45:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00287143
Message ID:
00287575
Views:
27
>Your formula is a little slower than the other one because it uses GOMONTH twice. It also has 5 function calls vs. 4 in the other one.
>
>But, IMO, it is more readable/clear.
>
>Vlad
>
>>How about GOMONTH( DATE(),1 ) - DAY( GOMONTH( DATE(),1 ) )
>>I guess there's many ways to skin a cat.

Actually, the code I use to get the last date of the month looks like

ldLastDay = GOMONTH( DATE(),1 )
ldLastDay = ldLastDay - DAY( ldLastDay )
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform