• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 133
  • Last Modified:

Issue converting number to correct date and time

I have some information coming in from a field device, which takes readings every five seconds. The time stamps are loaded into a integer array, with of course 5 second intervals which correspond to a temperature reading that I have also received. What I need to to is to be able to is pick a date/time from a calender function, then have the app place the correct date/time stamp into an array for me to use in a graph. Is this possible?


  • 2
1 Solution
Yes :D
Well, you might create a class :

Class CMeasurements

Give it a property dtmStart As Date

Init that with your real date.
Now create a structure

Structure Data
    Public TimeOffset As Integer
    Public MeasureValue As Double

End Structure

Create an arrayList of items of that structure type...

 Now when you're creating the food for your graph:
Get the real date/time by
Dim myDataItem as Data <--- was filled before, I just show the type here
Dim measurements as CMeasurements <-- created before
dim realDate as Date = measurements.AddSeconds(myDataItem.TimeOffset)

Something like that.....


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now