The Date.hourDiff() method API returns the difference between two different dates date, time, or timestamp fields in hours.
Parameters
- Date/time 1
- Date/time 2
Return Value
Number of hours between the two dates/times
Example
...
Code Block | ||
---|---|---|
| ||
pjs.define("time", { type: 'time', initValue: '12:00:00'}); pjs.define("time1", { type: 'time', initValue: '22:00:00'}); pjs.define("diff", { type: 'integer'} ); diff = Date.hourDiff(time1,time) ; return diff; // 10 |
RPG Equivalent
%DIFF()