I have tried the following SDK syntax to set a boolean that shows whether an archive value exists at a given time. I am getting surprising (non-working) results. These two options both indicate a match when none exists. Is there a better way to determine if an archived data value exists at a given time?
objPIValue = objPIData.ArcValue(dtmDateProduced, RetrievalTypeConstants.rtAtOrBefore)
Expected result: If objPIValue.TimeStamp.LocalDate = dtmDateProduced then '...we have a match
or Option 2)
objPIValue = objPIData.ArcValue(dtmDateProduced, RetrievalTypeConstants.rtCompressed)
Expected result: if a comexception is not thrown, we have a match
Neither of these options works. Both find a match when none exists.