>Is there a function to get the number of days in a month.
>eg. the number of days in any month of any year.
>
>Thanks
>Andrew
As long as I know VFP does not have a function for this, but is very easy you can make your own such as this
Function DaysOfMonth
Lpara tnMonth, tnYear
*-- have to pass the year also as parameter to find out if is a leap year
do case
case tnMonth=1
return 31
case tnMonth=2
if mod(tnYear,4)=0 &&leap year
return 29
else
return 28
endif
case tnMonth=3
return 31
etc...
etc...
endcase
Jorge Flores
From the Amigo Country