met with some kind of problem at the beginning of work. My project is currently receiving data from the serial port. But the data obtained looks like this:
Time → → →> Unit
10:40:17:08 16 26.7
10:40:17:10 16 26.7
10:40:17:23 16 26.7
All these data are received in real time.
How can I change the encoding of Datetime.Now to show such data.
8:40:17:08 16 26.7
9:40:17:10 16 26.7
10:40:17:23 16 26.7
means that only the last received data will have real-time time, the rest of the data with common "seconds" should have their own hour, respectively, press back.
I roughly understand that I have to add this "DateTime.Now.AddHours (-1)" only
EDITED
The system should know that if it receives data three times one at a time (16), the time of these three data number 16 should change accordingly. So how do I compare the data?
if (number = 3times)
{edit the time}
else
{record as usual}