AnsweredAssumed Answered

Export Date from process book to csv

Question asked by YoannCollinSubiron on Apr 19, 2017
Latest reply on Apr 20, 2017 by YoannCollinSubiron

Hello everyone,

 

I try to export data from a chart on process book (SQC) to csv. I managed to export the values I need except the timestamp of each point. You will find below my code :

... ... ...

Dim PtData As PIValues

Set PtData = SQCSymbol1.PlotDataPts

Dim iCnt As Integer

Dim j As Integer

Dim ValeurPR As Double

Dim TimeStmp As Double

With PtData

iCnt = .Count

For j = 1 To iCnt

    ValeurPR = .Item(j).Value

    TimeStmp = .Item(j).TimeStamp

    Print #NumFileT, TimeStmp; ";"; ValeurPR

Next j

End With

 

For the TimeStmp variable, I tried to put a Date dimension but I had an error message : "OVERFLOW". If I put Double or String or Variant dimension I have an incomprehensible number (see below) :

 

So which dimension should I put to have a correct Date? Or maybe my way of printing the date is wrong.

 

Thanks in advance for your help

 

Yoann

Outcomes