MrFancyteeth
Programmer
hello
is there a function that returns the number of days in a month?
is there a function that returns the number of days in a month?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Function DaysInMonth
LPARAMETERS p_dDate && any valid day in month interested in
ldFirstOfMonth = DATE(YEAR(p_dDate), MONTH(p_dDate), 1)
ldFirstOfNextMonth = GOMONTH(ldFirstOfMonth, 1)
RETURN (ldFirstOfNextMonth - ldFirstOfMonth)
nDays=(GOMONTH(CTOD("01"+SUBSTR(dtoc(DATE()),3,8)),1))-(GOMONTH(CTOD("01"+SUBSTR(dtoc(DATE()),3,8)),0))