GroveStreams

Sample Times Exposed in Derivation329

MikeMills private msg quote post Address this user
New Derivation System Variables:

SAMPLE_TIME: The time of the regular stream sample being calculated in epoch Milliseconds.
SAMPLE_SDTIME: The start date time of the interval stream interval being calculated in epoch Milliseconds.
SAMPLE_EDTIME: The end date time of the interval stream interval being calculated in epoch Milliseconds.


Post 1 IP   flag post
PigFarmer private msg quote post Address this user
Hey so I always feel bad asking these questions because the capabilities of GS is so much further along than anyone else! Its amazing you even have this stuff...

Anyway, I finally have my "door sensor" which I have now created a stream that determines how much time was spent on site by taking the last door event of the day minus the first door event of the day using these awesome new sample millisecond features.

In my widget, I want to show a recap of door activity for the day.

I want that to look something like this.

Last time door opened. Length of time. Times door opened
Date
10/28/15 10/28/2015 4:00 PM 6.78 hours 37
10/27/15 10/27/2015 1:37 PM 4.32 hours 28

So, can you take a millisecond and turn it into a date in an easy way or would you need to like combo up a bunch of strings using subtraction and stuff all the way back to 1971??

THANKS IN ADVANCE
Post 2 IP   flag post
PigFarmer private msg quote post Address this user
OK, I set the data type as a date and voila - it worked. AMAZING how self-reliant quality Grovestreams users can be?
Post 3 IP   flag post
MikeMills private msg quote post Address this user
Stream value type could be Date or Long for the epoch millis sample time. They're stored the same way. The user interface will use the value type to determine how to display the value which would be as a Date/Time or as a number.
Post 4 IP   flag post
2889 4 4
Log in or sign up to compose a reply.