benoitp
1
Hello,
In a pipeline rule i’m trying to log the time in EPOCH timestamp format, like “1644488094000”
I tried this, and many more 
let date = parse_date(to_string($message.timestamp), "yyyy-MM-dd'T'HH:mm:ss.SSSZ");
let final = to_double(date);
debug(date);
But i still get the date into a human readable format :
2022-02-10T11:56:31.095+01:00 INFO [Function] PIPELINE DEBUG: 2022-02-10T10:56:31.094Z
Any idea how to achieve this ?
Thanks
benoitp
2
I found the answer :
let date = parse_date(to_string($message.timestamp), "yyyy-MM-dd'T'HH:mm:ss.SSSZ");
debug(date.Millis);
The documentation on «parse_date» must be improved as the parse_date object returned is not explained.
1 Like
system
(system)
Closed
3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.