pmscraiova
Programmer
I want to find out the number of days into a month. For exemple, how many days are in february this year (but next year?). Sorry for my english...
Thank you, Eugen Fintina
Thank you, Eugen Fintina
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 DatesinMonth
LPARAMETERS p_nYear, p_nMonth
LOCAL ldDate
IF PCOUNT() < 2 OR VARTYPE(p_nMonth) <> "N"
p_nMonth = MONTH(DATE())
ENDIF
IF PCOUNT() < 1 OR VARTYPE(p_nYear) <> "N"
p_nYear = YEAR(DATE())
ENDIF
ldDate = DATE(p_nYear, p_nMonth, 1)
RETURN (GOMONTH(ldDate,1)-ldDate)