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?

Thanks,

Brad
bradbrittonAsked:
Who is Participating?
 
PockyMasterCommented:
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.....

0
 
PockyMasterCommented:
Yes :D
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.