cancel
Showing results for 
Search instead for 
Did you mean: 

PCo 2.1 PIOLEDB datetime issue

Former Member
0 Kudos

Hi experts,

we noticed an issue with OLEDB queries with PCo to a PI system. I already checked the existing threads and found the thread about PCo 2.2 PIOLEDB datetime problem which were solved with using in DataLink properties timezone "UTC". But that solution works only for reading data from the PI source system. If you want to write a value to a PI tag with a specific timestamp PCo or MII automatically convert the timestamp to UTC. I tried also with timezone "Local" and "Server". All three options are not working.

For my understanding when I write a value with a specific timestamp to PI I should get that value with the inserted timestamp back. So it seems that PCo is partially converting to UTC but not in both cases.

Here is an example (PI server, MII/PCo server is located in Germany) with UTC timezone in PCo datalink setting:

"INSERT INTO picomp2 (tag, time, value) VALUES ('Testtag', '03/14/2013 18:21:00', '5')" store the value on the PI server with time stamp '03/14/2013 19:21:00' which is one hour offset (which is the difference between timezone in Germany and UTC).

"SELECT * FROM pisnapshot where tag =  'Testtag'" has the result of '03/14/2013 19:21:00'

We are using similar queries with the old PIOLEDB connector since some years and that is working fine (on same machine). Only PCo has such strange behavoir.

Our system is MII 11.5 SP6 with PCo 2.1 SP6 Patch 11. I did also some tests with PCo 2.2 but the result was the same.

Do you have any idea for this behavior or suggestions to solve that issue?

Thanks in advance,

Patrick

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

we got a solution from SAP. There is a version of PCo 2.1 available which solve the issue. It is 2.1 SP6 Patch 12. Also 2.3 SP Patch 1 works well. In both versions the checkbox to convert the time to UTC need to be used and the right time zone need to be set. This option was not working in the old version which was the reason that the result was not correct.

Thanks,

Patrick

Answers (0)