Ir al contenido principal

Sage X3 end-date of a month


X3 4GL function that returns the end-date of a month
  1. Funprog F_ENDOFMONTH(PMONTH,PYEAR)
  2. Value Integer PMONTH
  3. Value Integer PYEAR
  4. Local Date YD
  5. PMONTH += 1
  6. If PMONTH > 12 Then
  7. PMONTH = 1
  8. PYEAR += 1
  9. Endif
  10. YD = gdat$(1,PMONTH,PYEAR) - 1
  11. End YD
to test the function execute something like that:
  1. Infbox num$(func F_ENDMONTH(11,2015))