date.extractMonth()
Description
The extractMonth() method returns the month portion of a date or timestamp value.
Parameters
Length (optional) - Number of digits to keep in the integer portion of the result. If the value has more digits, the leftmost digits are dropped.
Decimals (optional) - Number of decimal positions to keep in the result.
Return Value
The numeric month value of the date or timestamp, from 1 (January) through 12 (December).
Example
pjs.define("date", { type: 'date', initValue: '2017-05-01' });
pjs.define("num", { type: 'zoned', length: 7, decimals: 2 });
num = date.extractMonth();
return num;
// 5RPG Equivalent
EXTRCT