functions

fhGetValueAsDate

Description

Returns the value of an item pointer as a date object. Returns nil if the pointer contents are not a date.

Syntax

dtDate = fhGetValueAsDate(ptr)

Parameters

ptr
item pointer

Returns

dtDate
Date Object

Example

pi = fhNewItemPtr()
pi:MoveToFirstRecord('INDI') -- Get first individual record
pi = fhGetItemPtr(pi,'~.BIRT.DATE') -- Move pointer to the first Birth Fact Date
dtDate = fhGetValueAsDate(pi)  -- Get the Date Object