<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using a different field for time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-different-field-for-time/m-p/592924#M206371</link>
    <description>&lt;P&gt;If NodeTime is the preferred field to use then the data should be onboarded using that field as _time.&amp;nbsp; If it is only one field that can be used then another method is needed.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=*SYSTEM* sourcetype=logactivity host=apac type= "Access granted" portalname=APAC*
```Get the search's time range```
| addinfo
```Convert NodeTime into epoch form```
| eval eNodeTime = strptime(NodeTime, "&amp;lt;&amp;lt;format string&amp;gt;&amp;gt;")
```See if NodeTime falls inside the selected time window```
| where eNodeTime &amp;gt;= info_min_time AND eNodeTime &amp;lt;= info_max_time
| dedup personkey
| chart dc(personkey)&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 07 Apr 2022 14:36:30 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-04-07T14:36:30Z</dc:date>
    <item>
      <title>How to use a different field for time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-different-field-for-time/m-p/592879#M206360</link>
      <description>&lt;P&gt;Hi All! The data I am pulling is coming from nodes in multiple time zones. I want to use that time zone instead of Splunk's time field. The correct time data is already being pulled in a NodeTime field but I cannot figure out how to use that field instead of Splunk's time field. Any ideas? TIA for the help!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 15:38:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-different-field-for-time/m-p/592879#M206360</guid>
      <dc:creator>HWalk1</dc:creator>
      <dc:date>2022-04-07T15:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using a different field for time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-different-field-for-time/m-p/592902#M206361</link>
      <description>&lt;P&gt;The time picker and the &lt;FONT face="courier new,courier"&gt;earliest&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;latest&lt;/FONT&gt; keywords only use the _time field.&amp;nbsp; There is no way to change that.&amp;nbsp; You can, however, filter on the NodeTime field yourself (after any necessary conversions) using something like&lt;FONT face="courier new,courier"&gt; | where NodeTime &amp;lt; foo&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;It sounds like the data is not being onboarded as well as it could be.&amp;nbsp; If NodeTime is the best time field then that is what the props.conf settings for the sourcetype should be using for _time.&amp;nbsp; We can help fix that, if you like.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 13:07:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-different-field-for-time/m-p/592902#M206361</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-04-07T13:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using a different field for time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-different-field-for-time/m-p/592912#M206364</link>
      <description>&lt;P&gt;So I am using the below query in a dashboard. I have a time range picker on the dashboard as well. I want the people who use the dash to be able to pick the time and have it be from the NodeTime field rather than splunk's time field. What you're saying is that the data should be onboarded using that field for _time? Or is there a different way to accomplish this?&lt;/P&gt;&lt;P&gt;index=*SYSTEM* sourcetype=logactivity host=apac type= "Access granted" portalname=APAC*&lt;BR /&gt;|dedup personkey&lt;BR /&gt;|chart dc(personkey)&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 13:45:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-different-field-for-time/m-p/592912#M206364</guid>
      <dc:creator>HWalk1</dc:creator>
      <dc:date>2022-04-07T13:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using a different field for time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-different-field-for-time/m-p/592924#M206371</link>
      <description>&lt;P&gt;If NodeTime is the preferred field to use then the data should be onboarded using that field as _time.&amp;nbsp; If it is only one field that can be used then another method is needed.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=*SYSTEM* sourcetype=logactivity host=apac type= "Access granted" portalname=APAC*
```Get the search's time range```
| addinfo
```Convert NodeTime into epoch form```
| eval eNodeTime = strptime(NodeTime, "&amp;lt;&amp;lt;format string&amp;gt;&amp;gt;")
```See if NodeTime falls inside the selected time window```
| where eNodeTime &amp;gt;= info_min_time AND eNodeTime &amp;lt;= info_max_time
| dedup personkey
| chart dc(personkey)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 07 Apr 2022 14:36:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-different-field-for-time/m-p/592924#M206371</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-04-07T14:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using a different field for time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-different-field-for-time/m-p/592964#M206384</link>
      <description>&lt;P&gt;In Splunk _time is the most important field of them all &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It's the single most effective method of speeding up your search - by narrowing your timerange.&lt;/P&gt;&lt;P&gt;And the process of onboarding new source should include analysis where should Splunk get the event's timestamp (the _time value) from. Sometimes the appropriate timestamp is the moment when forwarder receives the data (for example when a log file doesn't contain any time-related information whatsoever). Sometimes the time is explicitly given in a "header" file of the event (like with most syslog messages). But sometimes the event can contain many different bits of time-related info.&lt;/P&gt;&lt;P&gt;For example you might have a transaction start, end and a request timestamp along with a timestamp from the logging system. All within the same event. And it's a part of the onboarding process to decide which of these timestamps is the "true" event's timestamp and which should be extracted as the _time field. This will be the one that events are by default ordered by and it's the one that you can easily limit search timerange with timepicker or earliest/latest condition. And this one works very fast.&lt;/P&gt;&lt;P&gt;You can have also other time containing fields extracted but you can't easily limit your search the way you do with _time. With those fields you have to search for some superset of your events and filter it by the | where clause.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 18:33:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-different-field-for-time/m-p/592964#M206384</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-04-07T18:33:40Z</dc:date>
    </item>
  </channel>
</rss>

