The date.extractHours() method returns the hours portion in a time field or time-stamp.
Parameters
- Length(Optional)
- Decimals(Optional)
Return Value
The number of hours in a time field or time-stamp
Example
pjs.define("time", { type: 'time', initValue: '12:11:12'}) pjs.define("num", { type: "zoned", length: 7, decimals: 2}) num = time.extractHours(1); return num; //2