Hi all,

I would like to find the timestamp for fag's value equal to some value over SDK by using VB.net. I have try to use IPICalculation function to find the answer as following code:

startTime = "y"

endTime = "t"

expr = "FindEQ('sinusoid', 'y', 't', 60)"

vals = IPICalculation.Calculate(startTime, endTime, expr, SampleTypeConstants.stRecordedValues, "")

After calculation, the vals have 3 objects:

vals(0) = nothing

vals(I).TimeStamp = #8/31/2015# {Date} <- starttime = "y"

vals(2).TimeStammp = #9/1/2015# {Date} <- endTime = "t"

But the right answer is #8/31/2015 12:25:30#

How can I do with IPICalculation function in VB.net ? Or, Does there have other method can to find the timestamp by using VB.net SDK ?

Thank you.

Hi Ming-Wei,

The calculation result you are looking for is in the PIValue.Value property. Since it is a timestamp, the results will be a PITime object. You can convert the PIValue.Value property into a PITime object and look at the LocalDate property to get the answer you are looking for.