//Input String yyyymmdd
var date_string = '20200101'
//Create date object
var oDate = new Date(date_string.substr(0, 4), date_string.substr(4, 2), date_string.substr(6, 2))
oDate.setMonth(oDate.getMonth() - 1)
var year = oDate.getFullYear().toString()
var month = oDate.getMonth().toString()
var day = oDate.getDay().toString()
//Add leading zero's
if (month.length === 1 ) {
month = '0' + month
}
if (day.length === 1 ) {
day = '0' + day
}
//Return string: 20191201
var sDate = year + month + day
Tag: calculation
[ABAP] Calculation
* ab ABAP 7.54
DATA field TYPE p decimals 2.
field += 4.
field -= 2.
field *= 3.
field /= 2.
*obsolet: ADD, SUBSTRACT, MULTIPLY, DIVIDE