I am running Pi Processbook 2012 SP2
Sounds like what you are after is the Playback Toolbar. There is a short video on using this available on the OSIsoft Youtube channel here.
Is this the functionality you are looking for?
Good video but not exactly what I am looking for. I understand the playback tool bar and its usefulness.
Imagine an HMI of a reactor in a plant. At the top of the screen is a clock displaying the current date and time.
Now image a process book display of same reactor. At the top of the display is clock showing the date and time of the data being displayed(say last week when we got high temp alarms).
I could have data points show their timestamps but that will confuse some people because of different timestamps for data based on compression and exception. I would really like a digital display of the current playback time. I tried this procedure Private Sub Display_TimeRangeChange(ByVal StartTime As String, ByVal EndTime As String) On Error Resume Next Dim lclstrDate As String Dim lclstrTime As String Dim lclstrDateTime As String Dim lclstrAMPM As String Dim lclstrFormattedDateTime As String lclstrAMPM = Right(Me.EndTime, 2) lclstrDateTime = Left(Me.EndTime, Len(Me.EndTime) - 7) & " " & lclstrAMPM lclstrTime = Format(CDate(lclstrDateTime), "hh:mm:ss AMPM") lclstrDate = Format(CDate(lclstrDateTime), "dddd, mmm d yyyy") lclstrFormattedDateTime = lclstrDate & " " & lclstrTime Me.txtplaybacktime.Contents = lclstrFormattedDateTime End Sub It might be working correctly but I want to be sure.
Sorry, seems I slightly misunderstood what you were looking for.
I tried your code here and it works fine, though I changed the output to Me.txtplaybacktime.Text = lclstrFormattedDateTime as I couldn't see the display time otherwise. Your use of Me.EndTime is probably what you want, as the display's end time is what single value symbols such as Values, Bars etc are going to be set to when they show a tag value, and the values in a trend object (when you have the show Value option selected in the Display Format options) will also be at the end of the time range.
Alternatively, you could create a PE/Analytic that writes a datetime value of '*' to itself, executing every second. In PB you can include this via the Value symbol, and then when you playback time with the PB toolbar, you should have this be a good representation of time for all the rest of the tags.
Retrieving data ...