Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Last date in month
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00388597
Message ID:
00388608
Views:
9
>Does anyone have a simple function that returns the last date available in a given month?

I think it's been posted before, but you can try this:

dv = date value to try

dv = DATE()
?DAY(GOMONTH(dv-DAY(GOMONTH(dv,1))+1,1)-1)

Gives you 31 for date value of 7/5/2000.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform