T24-Dates Manipulation
T24-Dates Manipulation
wikibanking.info/2012/09/dates-manipulation/
CURRENT.TIME = TIMEDATE()
Date formatting:
CALL DIETER.DATE(DATE.IN,DATE.OUT,’D’)
Example:
ORD.DATE = R.DXO<DX.ORD.TRADE.DATE>
ORDER.DATE = ''
With DAYS.DIFF set to W for a difference in working days, C for a difference in calendar
days. After the call, DAYS.DIFF will contain the days difference. No region (first
parameter equals “”) means default region “00”.
Example:
REMAIN.CAL.DAYS = "C"
START.DATE = TODAY
END
CALL CDT(YREGION,YDATE, YDAYS)
With:
YDATE= YYYYMMDD
1/2
YDAYS: number without (= ‘+’) or with ‘+’ or ‘-‘ sign in front and without (= ‘W’) or with ‘W’
(= Working days to be calculated) or ‘C’ (=Calender days to be calculated) at the end.
Example:
if TODAY = 20140606
Example with “date_to_check” which can be the next open day if it’s a banking holiday:
COUNTRY.CODE = ''
COUNTRY.CODE = R.COMPANY(EB.COM.LOCAL.COUNTRY)
RETURN.CODE = ""
CALL WORKING.DAY('',date_to_check;,'','','',COUNTRY.CODE,'','',RETURN.CODE,'')
IF RETURN.CODE = 0 THEN
(...)
END ELSE
ADJ.MAT.DATE = date_to_check
CALL CDT('',ADJ.MAT.DATE,'+1W')
(...)
END
2/2