want to format date in "Feb 21, 2020 7:52:15 PM", format
What I have "zonedTime": "2020-02-21T19:52:15.001Z", and UNIX epoch as input
want to format date in "Feb 21, 2020 7:52:15 PM", format
What I have "zonedTime": "2020-02-21T19:52:15.001Z", and UNIX epoch as input
Does this anwer your question?
Yes.. that helped ... Thanks....
ruby {
code => '
t = event.get("starttime")
event.set("timestamp", Time.at(t.to_f).strftime("%b %d, %Y %H:%M:%S %p"))
'
}
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.