>Hello comunity
>
>I need some help for create a procedure or function that can use on any code to return by Year the number of days in determinate Month.
>For example if i want to know for a specific year the number of days in determinate month.
>i can create for example sails between two dates and for a particular year and i want to return the totals of sails in this year by divide them for the number of days in this month.
>
>Many thanks
>Luis Santos
function NumberOfDaysInMonth
lparameters tnYear, tnMonth
local ldDate
ldDate = date(m.tnYear, m.tnMonth, 1)
return day(gomonth(m.ldDate,1)-1)
From the top of my head.
If it's not broken, fix it until it is.
My Blog