I am using PIArcVal() to retrieve
previous values to a given time stamp. I have been using this for a few years now but suddenly this week my unchanged Excel2007 workbook has started behaving oddly.
A formula,
=PIArcVal(tag, "05-Jan-11 00:00:00", 1, PIServer, "previous") works and provides data like this:
04-Jan-11 23:58:00
04-Jan-11 23:30:01
04-Jan-11 23:37:59
However if I place the date in a cell and refer to it thus
=PIArcVal(tag, B$1, 1, PIServer, "previous")I get this data returned:
30-Apr-11 23:58:00
30-Apr-11 23:30:01
30-Apr-11 23:37:59
Looking at the actual numbers in the time stamp, 05-Jan-11 = 40548. However PI is treating this not as 5/1/2011(5th Jan) but as 1/5/2011(1st May). The day prior to 1st May is of course the 30th Apr hence the values returned.
The timestamp is formatted as dd-mmm-yy and the PI Settings also uses that same format.
Has anyone else seen this behaviour or have any idea how to solve?
MilesUK
ProcessBook v3.0.15.3