Hi!
I have a date in the form of a string
(epoch) like below:
"1553012442470"
Now I want to use scripted fields in kibana
to convert the string date time to a date
field.
Also perform multiple operations with the field on the date, for example, subtract these two dates and choose the days of difference
How can I go about it?
1 Like
lukas
(Lukas Olson)
March 20, 2019, 3:24pm
2
Is there any reason you wouldn't want to do this at ingest time instead of after the fact with a scripted field?
Lukas,
When indexing the data we indicate the date Epoch is the _id
I can not reindex the data and change the mapping
lukas
(Lukas Olson)
March 22, 2019, 8:55pm
4
return new Date(Long.parseLong(doc["_id.keyword"].value));
Thanks Lukas! :sonriendo:
Thanks Lukas! :sonriendo:
system
(system)
Closed
May 8, 2019, 5:26pm
7
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.