How To Make Time Continue
How To Make Time Continue
(OP)
I am collecting real time data from a PLC diectly into an excel spreadsheet. I also graph the data as collected. I am collecting 24 hr worth of data at a time. My time stamp is in the format of xx:xx:xx XM. My problem is when midnight rolls around my data moves to the o point on the X-axis instead of continuing on. The graph is then hard to follow. Any thoughts on how to make the time simply continue on out?





RE: How To Make Time Continue
RE: How To Make Time Continue
RE: How To Make Time Continue
remember that the date is just a number, counting the days from some distant datum (jan 4 1901 or something). fractions of days (like .25) return hours (6am), so maybe you could add today's date when you import data for one day
RE: How To Make Time Continue
i created demo using a line type chart with no problems.
good luck!
-pmover
RE: How To Make Time Continue
RE: How To Make Time Continue
TTFN
RE: How To Make Time Continue
Paste the below code into a new macro and run it to see what you get.
CODE
For iCount = 1 To 10
Cells(iCount, 1) = Now
Debug.Print Now
PauseTime = 1 ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
' Yield to other processes.
Loop
Next iCount
End Sub
In Excel I had to change the Cell Format to Custom and then entered "m/d/yyyy hh:mm:ss AM/PM" to get all the date and time info to display in the cell (note that if you look at the Formula Bar all the info. is there in each cell, it's just the disply format that was rounding off the seconds).
Ken