To_char converted time error


#1

Hi,

I am pulling rows from oracle db using the query;

SELECT request,response,reqtime,TO_CHAR(reqtime, 'DD-MM-YYYY hh:mi:ss.FF3 AM') as req_time,restime FROM logtable

The JSON I have found in kibana for the corresponding entry is;

{
  "_index": "myindex-2017-02-02",
  "_type": "logs",
  "_id": "AVn9cI2V2fWIWeet44y3",
  "_score": null,
  "_source": {
	"request": "get",
	"response": "0",
	"req_time": "12-12-2016 05:40:04.563 AM",
	"restime": "2016-12-12T00:10:04.597Z",
	"reqtime": "2016-12-12T00:10:04.563Z",
	"@timestamp": "2017-02-02T06:08:46.100Z",
	"@version": "1",
  },
  "fields": {
	"restime": [
	  1481501404597
	],
	"reqtime": [
	  1481501404563
	],
	"@timestamp": [
	  1486015726100
	]
  },
  "sort": [
	1481501404563
  ]
}

The error here is , reqtime and restime are correct, but req_time is incorrect. reqtime and req_time are suppose to be same, but in different display formats. When I triggered the same using SQL developer client, the times appear as same. I am using ELK stack GA 5.0.0. Why is this happening and how can I fix this?

Thank you.


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.