Difference between two DATETIMEs in ESSQL in Canvas (No script fields)

Hello, I need to calculate the time difference between two DATETIMEs, more specifically, between an timestamp and NOW(), preferably in the essql query, in canvas. I found nothing like the TIMEDIFF() sql function, only datetime math based on intervals which don't really cut it here.

Thanks in advance.

Hi @ebalmeida,

TIMESTAMPADD and TIMESTAMPDIFF it's on our TODO list: https://github.com/elastic/elasticsearch/issues/37927.
These two are the last ones to implement from that list.

Well, guess I'll have to wait then =)
I did work out the cast to long mechanic though, which is not ideal but will do in a pinch.

Thanks a lot

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.