How to use DateEncoder for the data which has been generated persecond

encoders

#1

We have a data csv which has the timestamp field increased by 1 second. How to configure the DateEncoder for per second data?

Time Stamp format is 10/4/2014 0:04:01 (MM/DD/YYYY hh:mm:ss)

10/4/2014 0:04:01
10/4/2014 0:04:02
10/4/2014 0:04:03
10/4/2014 0:04:04

Please reply.

Sawan


#2

I don’t think you can use the DateEncoder for that purpose; the unit of the timeOfDay parameter is hours, and the argument type is int, so it looks like the smallest resolution possible is one hour.

You could get around it by pre-processing and converting your timestamp to seconds first, then encoding that with a RandomDistributedScalarEncoder.


#3

Related: