Date fields comparison

Hi There!
I would desire to create a scripted field comparing 2 date fields in Kibana, in particular:
I want to use current date ( new Date().getTime() ) and a date field I indexed already (named expiring date). The comparison I want to do is something like :"if current date is more recent than expiring date return working, if not return expired.

This syntax:
new Date().getTime() > doc['expiting date'].value
doesn't work.

Could anyone help me please? Thanks in advance!

There are dozens of examples out there.
Here are a couple of them -->

1 Like

Thank you, I read already something similar to that since, as you say, there are dozens of similar topics. The very aim of my request is to create a kind of gantt diagram in Kibana, or something similar to it. I was wondering to create a proper date field as an escamotage to reach my point, but if you guys have a "more direct" suggestion for me, tell me :slight_smile:

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