Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Timestamping DataTables with the previous day/month/etc


mjb Jan 25, 2012 05:28 AM

Is there any way to have the timestamp of a record in a DataTable reflect the timeframe of the data in the record?

For example, we collect maximums and minimums of various sensors, and call a datatable to record these at:

DataInterval(0,1,Day) .. etc.

This means that the data for yesterday is timestamped with today - similarly for monthly records - the data for December is timestamped January.

Unless there's a more elegant way to collect data like this?


Sam Jan 25, 2012 02:59 PM

Currently the only methods I know of are

a) post processing the data

and

b) with a 1 second scan, calling the table with a DataInterval() of

DataInterval(86399,86400,Sec) 'one second before midnight


aps Jan 25, 2012 03:29 PM

I believe we have this as a wish list item for our PC software (Loggernet for one). An extra option may (no promises yet) be implemented in the next release which should be released some time later this year (not soon). We should be implementing the equivalent function we supported in our older loggers where midnight can optionally be stored as 24.00 hours (in the previous day) which solves many peoples issues with what happens now.

The other way of circumventing this issue is to store a second timestamp value within the data which you manipulate to create the fake time before storing it.

Sam's solution is much simpler, although from a theoretical (or some might say pedantic) stance the timestamp for a daily statistic should probably be mid-day rather than one second to midnight.

* Last updated by: aps on 1/25/2012 @ 8:30 AM *


kokihualpa Oct 24, 2014 02:01 PM

excuseme sam

what about averages daily?..

instead of DataInterval(0,1,Day,10)

is like this DataInterval(0,86400,sec,10)?


Sam Nov 10, 2014 01:30 AM

DataInterval(0,1,Day,10)

and

DataInterval(0,86400,sec,10)

are equivalent


also i believe

DataInterval(86399,86400,Sec)

and

DataInterval(-1,86400,Sec)

are equivalent


kokihualpa Nov 12, 2014 01:27 PM

ok

my situation with 60 second of scan how can i call the table?

like this?: datainterval(1439,1440,min,10)


Sam Nov 13, 2014 04:38 AM

The two numbers both need to be evenly divisible by the scan rate of the scan calling the table.


kokihualpa Nov 17, 2014 01:13 PM

ok
i am gonna try with

datainterval(1439,1440,min,10)

for a averages daily for a previous day

with a scan of 60 sec

Log in or register to post/reply in the forum.