Hi
my input timestamp is April 22 2018 11:11:56 PM EDT How i can write parsedate inpipeline rule .
For Example:
For todays date : 2018-04-25 10:10:06 AM IST i am writing like below
let new_date = parse_date( to_string($message.timestamp),
“yyyy-MM-dd HH:mm:ss”,
“Asia/Kolkata”);
set_field(“timestamp”, new_date);
How i can write for
April 22 2018 11:11:56 PM EDT
Thanks,
K.Jayakumar
jan
(Jan Doberstein)
April 25, 2018, 6:07pm
2
you would need to rewrite the format that it will match your date string according to the time parser
http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTimeParser--
Hi - in a situation where the logs have two different formats: yyyy-MM-dd HH:mm:ss and yyyy-MM-dd HH:mm:ss.SSSSSS, how do I write rules to check which format is being processed and parse accordingly?
jochen
(Jochen)
May 8, 2018, 7:04am
4
You could use the regex()
function to match the input against the expected date format.
1 Like
system
(system)
Closed
May 22, 2018, 7:04am
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.