AnsweredAssumed Answered

PI-SDK iPIData2.Summaries2 - start/end time interpretation

Question asked by VCampus-METCO on Jun 17, 2015
Latest reply on Jun 22, 2015 by VCampus-METCO

Hello,

 

I just noticed some strange behaviour with the way in which the start and end times are interpreted with the IPIData2.Summaries2 call to get the average value for a tag.

My client is configured with English UK regional settings with short form date dd/mm/yyyy.

 

Using the tag CDT158, and strings to pass in the start/end time "16/06/2015" and "16/06/2015 23:59:59" the call fails with the error  "[-11059] No Good Data For Calculation"?

Using the tag CDT158, and strings to pass in the start/end time "16-Jun-15" and "16-Jun-15 23:59:59" the call is successful.

Using the tag CDT158, and strings to pass in the start/end time "06/16/2015" and "06/16/2015 23:59:59" the call is successful.

 

So it looks like the SDK call if passed a string will always assume the string is in English USA format and not the regional setting of the client PC.

Is this a "Feature" or a bug with PI-SDK. The documentation does not mention any restrictions over the date format used with strings.

 

I am using PI-SDK 2012 so maybe this behaviour has been fixed.

 

Simon

Outcomes