Splunk Search

Compare Current date with field Date

dlnewman
Loves-to-Learn

I am trying to compare the current date with the lastInformTime I have tried | eval but nothing seems to work. 

index="device_list" pppUsername=* provRecordStatus=Succeeded
| eval timenow=now()
| spath lastInformTime
| search lastInformTime>=timenow
| dedup macAddress, serialNumber
| table ipAddress, serialNumber, lastInformTime, pppUsername, macAddress

The _time that is brought in during the import does not compare with any date in the export. I am not sure where Splunk is getting it from. Is there a way to set the _time to the lastInformTime? TIA

0 Karma

to4kawa
Ultra Champion

| eval _time=lastInformTime

or

| rename lastInformTime as _time

0 Karma
Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Your Voice Matters! Help Us Shape the New Splunk Lantern Experience

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Building Momentum: Splunk Developer Program at .conf25

At Splunk, developers are at the heart of innovation. That’s why this year at .conf25, we officially launched ...