PI Event Time

Discussion created by aladams on Aug 30, 2010
Latest reply on Oct 21, 2010 by

I am trying to capture the PI Event Time that is seen in the PI System Management Tools Archive Editor.  I need the date/time down to the sub-seconds.  When I run the following code I only get down to the seconds and this is causing me problems when there are more than one recording down to the second. Is there a way to capture the sub-seconds? 

Dim rttype As RetrievalTypeConstants    'retrieval type = atorbefore

Dim dtLateDate As Date                  'late date/time

Dim pt As PIPoint                       'pi point
Dim pv As PIValue                       'archive value
Dim ptlist As PointList                 'pi point list

dtLateDate = ThisDisplay.dtpLateDate + ThisDisplay.dtpLateTime

For Each pt In ptlist
        Set pv = pt.Data.ArcValue(dtLateDate, rttype)

       'from here I use the pv.Value and pv.TimeStamp.LocalDate

PI Data

Value               Event Time

Non-Update      8/25/2010 7:44:37.47011 PM


533.3333         8/25/2010 7:44:37.97011 PM