X3 4GL function that returns the end-date of a month
Funprog F_ENDOFMONTH(PMONTH,PYEAR) Value Integer PMONTH Value Integer PYEAR Local Date YD PMONTH += 1 If PMONTH > 12 Then PMONTH = 1 PYEAR += 1 Endif YD = gdat$(1,PMONTH,PYEAR) - 1 End YD
to test the function execute something like that:
Infbox num$(func F_ENDMONTH(11,2015))
Una risposta su “Sage X3 end-date of a month”
Ther is a STD function “eomonth(date)”