Calculate two timestamps difference using uniqueid in elasticsearch query

hi elk team,

is it possible to calculate two timestamps difference using uniqueid in elasticsearch query?

many thanks!!

Yes it is

could you share me sample ?

I am assuming you want to extract a timestamp from elasticsearch using a unique id and compare it to your current timestamp.

subtract two dates by id