Downloading data from database

5 years 7 months ago #2971 by daviesrv
I get the data down, but the time stamp field is a sequential filed something like
1456083444295
1456083444350
for each temperature that is done.
When I really need an actual date;... something like 22/2/2016 05.10

Please Log in or Create an account to join the conversation.

5 years 7 months ago - 5 years 7 months ago #2972 by NightOne
Yes, what you are seeing with the long number is epoch time or also called Unix epoch...its the number of seconds since Thursday, 1 January 1970... If you are using excel then you will have to convert the epoch time to normal time with a conversion

Please Log in or Create an account to join the conversation.

5 years 7 months ago - 5 years 7 months ago #2973 by NightOne
Sorry I am an idiot....I forgot to tell you that the timestamp on EasyIOT is in millsecond so you will need to use a formula like this

=((A1/1000)/86400)+25569 or

=(A1/1000)/(60*60*24)+DATEVALUE("1/1/1970")

Where A1 is where your epoch time is....PS... this is in GMT....

Also to set the excel cell so you can see date and time you will need to use custom format (Right Click--Format Cell--Custom)... scroll up costum formats and you will see dd/mm/yy hh:mm or you can change it to whatever you want
The following user(s) said Thank You: daviesrv

Please Log in or Create an account to join the conversation.

5 years 7 months ago #2974 by daviesrv
Epic . You get my gold star of the day.

Epoch Time eh.

Always good to learn something new every day.

Thanks.

Roger

Please Log in or Create an account to join the conversation.

5 years 7 months ago #2982 by EasyIoT
@NightOne is correct. Time is in epoch * 1000. I think this is the easiest way to manipulate time series. If anyone has better idea I can change it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.231 seconds