When user opts for showing in absolute time of data recording, how can I get the X-axis display back to DateTime format? I have the following code showing the OADate representation, but not the actual date and time format. Please suggest a solution.
Code: Select all
Private Function SetXAxisToAbsoluteTime()
Try
Dim i, j As Integer
Dim oldTime As New Date(myTimeTicks)
Dim timeInterval As Double = 1.0 / (rateOfDataCollection)
For i = 0 To HighlightedGraphPanel.Series.Count - 1
For j = 0 To HighlightedGraphPanel.Series(i).Count - 1
HighlightedGraphPanel.Series(i).XValues(j) = oldTime.AddSeconds(j * timeInterval).ToOADate
Next
Next
HighlightedGraphPanel.Axes.Bottom.Title.Text = "Time"
HighlightedGraphPanel.Axes.Bottom.Labels.DateTimeFormat = "hh:mm:ss.ffff"
Catch ex As Exception
MsgBox(ex.Message)
End Try
Return Nothing
End Function