HPlogo MPE/iX Intrinsics Reference Manual > Chapter 7 Command Definitions (HP32208-HPLOACNMPROC)

HPDATEDIFF

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701 ♥
Edition 7 E0300
Edition 6 E0195

NM callable only.

This intrinsic determines the number of days that separate two given dates.

Syntax



              I32V      *          *           I32
  HPDATEDIFF (datecode, firstdate, seconddate, diffindays,
              I32     I32V
              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" found with the HPDATECONVERT intrinsic.

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.)

Related Information


IntrinsicsHPCALENDAR, HPDATECONVERT, HPDATEFORMAT, HPDATEOFFSET, HPDATEVALIDATE, HPFMTCALENDAR
Manuals




HPDATECONVERT


HPDATEFORMAT