Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function for days in the month
Message
From
05/01/1999 19:14:41
 
 
To
05/01/1999 18:47:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00172969
Message ID:
00172974
Views:
19
Shane,

James has a good point.

If you are passing the number of the month, you can modify my simple
function like this:

FUNCTION NumDays
lparameter xmonth
private xdate
xdate=ctod('01/01/'+str(year(date())))
return gomonth(gomonth(xdate,xmonth-1),1)-gomonth(xdate,xmonth-1)

Note that it is important to know which year you are in when using
the function because of the leap years.

:)

Pascal
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform