MPE/iX Intrinsics Reference Manual (32650-90875)
334 Chapter7
Command Definitions (HP32208-HPLOACNMPROC)
HPDATEDIFF
HPDATEDIFF
NM callable only.
This intrinsic determines the number of days that separate two given dates.
Syntax
I32V * * I32 I32 I32V
HPDATEDIFF(datecode, firstdate,seconddate,diffindays,status,cutoff)
Parameters
datecode
is a 32 bit signed integer by value
The value should be one of the date type codes listed in the
table, “Supported Date Formats."
firstdate
is the first input date. The interpretation depends on the value of
datecode
See the table,“Supported Date Formats," for the supported date
codes and their layouts.
seconddate
is the second input date. The interpretation depends on the value of
datecode
See the table,“Supported Date Formats," for the supported date
codes and their layouts.
diffindays
is the number of days difference between the two dates, computed
as:
seconddate-firstdate
. Thus if
seconddate
is earlier than
firstdate, diffindays
will be negative.
status
is the HPE_STATUS parameter through which the error codes are
returned. A value of 0 indicates no errors and no warnings.
cutoff
is a 32 bit signed integer by value (optional).
This is used in validating and converting the two-digit years
to four digit ones before computing the difference. (See
HPDATECONVERT documentation for more information.)
Operation Notes
Related Information
Intrinsics HPCALENDAR, HPDATECONVERT, HPDATEFORMAT, HPDATEOFFSET,
HPDATEVALIDATE, HPFMTCALENDAR
Commands none