We have a field by name “Validity” which shows the validity date as below for different products;
Validity : Dec 19, 2021
Validity : Dec 11, 2022
Validity : Mar 14, 2023
Validity : Aug 24, 2021
Here we need to create a field by name “DaysRemaining” which will have the values as number of days left from today by deducting the current date (of host running splunk ) with that Validity date. We will run that query once in every day so that the Days remaining will change every day.