We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Issue converting number to correct date and time

bradbritton
bradbritton asked
on
Medium Priority
151 Views
Last Modified: 2010-04-23
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
Comment
Watch Question

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.....

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.