Hello guys,
I am new to OSI SDK, i would like to get time value from PI Point but I get error 'Type mismatch'.
Dim PI_SRV As PISDK.Server
Dim PI_POINT As PISDK.piPoint
Dim PI_POINT_VALUE As PISDK.PIValue
Dim dt As New PITimeFormat
Dim MyDate As Date
MyDate = DateSerial(14, 12, 1) + TimeSerial(9, 46, 0)
dt.InputString = CStr(MyDate)
Set PI_SRV = PISDK.Servers("XXXXXXX")
Set PI_POINT = PI_SRV.PIPoints("ZZZZZ")
Set PI_POINT_VALUE = PI_POINT.Data.TimedValues(CDbl(MyDate))
Do you have any information guys !