Date Point

dp:Compare

Description

Allows the comparison of two date point objects. This uses the same comparison logic as Family Historian Queries do.

Syntax

iResult = dp:Compare(dpCompareDatePt)

Parameters

dpCompareDatePt
Date Point Object: Date Point to which this date is compared

Return Value

iResult
integer:
  • -1: this date point is less than comparision date point.
  •  0: this date point equal to comparison date point.
  •  1: this date point is greater than comparison date point.

Remarks

In this example the message box will always be shown:
dpBirthDate = fhNewDatePt(2010)
dpDeathDate = fhNewDatePt(1910)
iresult = dpBirthDate:Compare(dpDeathDate)
if  iresult > 0 then
   fhMessageBox('Birth Date after Death Date')
end