my app log is in epoch time format (sample: 1700529701700), can I convert this using script in data views to be human readable format in discover menu? or any suggestion how to convert this?
i saw this in google, but I encountered "Cannot cast from [java.util.Date] to [void]. Verify that you have correctly set the runtime field type." error
cmd:
return new Date(Long.parseLong(doc["TXN_END.keyword"].value));
epoch_millis
A formatter for the number of milliseconds since the epoch. Note, that this timestamp is subject to the limits of a Java Long.MIN_VALUE and Long.MAX_VALUE.
Sooo
format" : "epoch_millis",
Or as it says right in the beginning of the docs I referred you to.
Date formats can be customised, but if no format is specified then it uses the default:
`"strict_date_optional_time||epoch_millis"`
So you could also just not specify a format or use that one....
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.