Skip to main content
1-Visitor
Mar 6, 2018 8:16 AM UTC
Question

Datetime with microseconds

Hi,

 

for a big data project I have the requirement to save 8k datasets per second with a microsecond datetime field. Is there a possibility to save datetime values with microseconds?

4 replies

5-Regular Member
Mar 6, 2018 4:07 PM UTC

Hi @drichter in what sort of date/time format will the date& time be received within ThingWorx? 

Translate
drichter1-VisitorAuthor
1-Visitor
Mar 7, 2018 8:02 AM UTC

I'm not 100 sure but the sensor we used generates 8000 datasets per seconds (mean 8 datasets per ms). We will send this "8000 dataset"-package via the sdk to the thingworx server. Probably via a service call which accept a infotable.

 

Ok the normal datetime can not handle microseconds. Which other way can be used? Saving all microseconds since 1.1.1970 in a Long Property?

Translate
1-Visitor
Mar 7, 2018 8:08 AM UTC

Well, I don't know if it will be useful, but you can use a Stream with the following format:

 

Timestamp, mix(NUMBER), max(NUMBER), sum(NUMBER),first(NUMBER),last(NUMBER),average(NUMBER), data(JSON)

 

And you just record one resumed data point per millisecond or second with the statistical values, and the detail data it's recorded on the data column as a JSON format for instance.

 

Just an option.

Translate
1-Visitor
Mar 7, 2018 7:55 AM UTC

As far as I know, DATETIME fields on ThingWorx max precision it's milliseconds, and you will face a hard limit here as ValueStreams and Streams are indexed/pk by timestamp field, which it's millisecond precision and you wan't be able to record with more precision than that.

Translate