AztecTech

How to delete PI values using piar_deletevalue with time having subseconds

Discussion created by AztecTech on Feb 29, 2012
Latest reply on Jul 16, 2013 by Marcos Vainer Loeff

I need to delete a large amount of data from few tags. I am using the PI API function piar_deletevalue.

 

The function is declared as :

 
Declare Function piar_deletevalue Lib "piapi32.dll" (ByVal pt&, ByVal timedate&) As Long

 I am unable to convert time of the value to be deleted into the one required by the function and not sure what kind of variable to use ( currently trying with Variant).

 

The time has sub seconds in it. for e.g "1-Jan-2012 01:01:01.12345" .

 

How do I pass the "ByVal timedate& " in the function and delete the value ? Can a time with subseconds be passed ?

 

Is there any other method to delete values ( without using the Archive Editor in PI SMT ).

 

Please reply,

 

Thanks
Kapil Rakh

Outcomes