/ ************************************************** ****************** Function Name: f_getmonthlastday (anydate) Description: Get the last day of the last day: argdate: Date type, any day return type: Date design: MTU 201: 2004-07-28 ************************************************************ *********************************** /
Integer li_year, li_month, li_daydate ld_lastday
LD_LASTDAY = argdateli_year = year (ld_lastday)
LI_MONTH = MONTH (LD_LASTDAY) 1 // Next month
IF li_month> 12 THEN // Inter-year Li_Year = li_year 1END IF
LI_MONTH = MOD (Li_MONTH, 12)
LI_DAY = 1 / / Every month is starting from the 1st?
LD_LASTDAY = RelativeDate (Date (li_year, li_month, li_day), -1)
Return LD_LastDay