I have 2 date types columns in OpenSearch Document Table Visualization and I want to calculate the Time difference between the 2 columns
Col1: Jun 16, 2022 , 08:37:27.651
Col2: Jun 16, 2022 , 08:30:00.000
Is there any way to do so in OpenSearch Dashboard Please help?
One way to achieve this is to create a scripted field with a painless script.
Go to OSD > Stack Management > Index patterns and choose the index pattern you want to work on. Click on Scripted field and add your new field:
The example is not exactly what you need (time difference) but gives you a starting point.
Hope it helps.
PS : You can use scripted fields in visualizations and display them in your documents. However, you cannot search scripted fields.