Splunk Search

How to fill empty field with the time now

New Member

My search throws empty time-related fields and I want to fill that compo with the current time

0 Karma


Try adding this in to your search:

| eval now_time=now() | eval filled_time=coalesce(YourTimeFieldHere,now_time)|

Replace YourTimeFieldHere with whatever the name of your time-related field is. That should place the value of now() which is the current time into any empty value of your time field.

0 Karma