I get data from an SQL Server db via DB input (DB Connect v2) in my index.
I have a date field in epoch format from the db that I use as timestamp field.
When I search the index it seems like the date conversion is wrong sometimes. For instance see below result.
Time
5/12/15 4:56:47.000 PM
Event
"12-29-2015 16:56:47" object_id=281487347683737, id=3947, status="COMPLETED", status_object_id=3094610094, created=1419868607970
The column "created" comes from the database and should be converted. The date/time between quotes is the converted date which in this case has a wrong year (it should be 2014). The Time part is set to the time the data was loaded I think.
To compare, another set of data gave below result:
Time
5/19/15 9:30:04.000 AM
Event
"11-18-2009 09:30:04" object_id=281485922926681, id=32, status="CLOSED", status_object_id=3094610096, created=1258533004970
The "created" datetime and the datetime it was converted to are the same (11-18-2009 09:30:04) but the "TIme" field is set to today. This Time field is used to create separate year, month, etc. fields which I want to use to create a chart on.
There are also a lot of results that give the correct values, for example:
Time
11/5/14 11:22:58.000 AM
Event
"11-05-2014 11:22:58" object_id=281487302656167, id=3800, status="DISPATCHED", status_object_id=3120234513, created=1415182978970
Does anyone has an idea what is going wrong here? How these wrong conversions can be avoided because they make the data unreliable.
Or maybe explain how I can do it differently? To be clear: I want to make some charts on data from a database and I want to use a date field from the database to create counts per year, month and so on.
Thanks a lot!
... View more