Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Days in a Month
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00757135
Message ID:
00757221
Views:
9
>Is there a function available to calulate the # of days in a given month from a date() function?
>
>Jeff

There might be easier ways, but how about:
FUNCTION DaysInMonth
LPARAMETERS tdDate
   LOCAL ldTemp 
   
   ldTemp = DATE(YEAR(tdDate), MONTH(tdDate), 15)
   ldTemp = ldTemp + 25
   
   ldTemp = DATE(YEAR(ldTemp), MONTH(ldTemp), 1)
   
   RETURN DAY(ldTemp - 1)
ENDFUNC 
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform