<?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 Data model _time field format in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Data-model-time-field-format/m-p/549121#M155777</link>
    <description>&lt;P&gt;We are trying to create a data model with a custom _time field. We created the data model, and added a calculated field (SUBMIT_DATE_cron_e) that calculates a UNIX time with microseconds (like&amp;nbsp;&lt;SPAN&gt;1619093900.0043). We then created another calculated field called _time, and set this equal to&amp;nbsp;SUBMIT_DATE_cron_e. This effectively&amp;nbsp;overwrites the inherited (or original) _time field. These steps worked well.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A problem occurred&amp;nbsp;when setting the data model to accelerated. If I do a search on the data model during the acceleration build process, and I inspect the _time field, I see times in UNIX format with microseconds (like&amp;nbsp;1619093900.0043), as intended. However as the build progresses, the _time values change to UNIX time with no microseconds (like&amp;nbsp;1619093900). It looks like the _time field is truncated to have only seconds.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this according to design for accelerated data models? Is there a way to have a _time field in UNIX format with micro seconds?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Apr 2021 13:09:33 GMT</pubDate>
    <dc:creator>BernardEAI</dc:creator>
    <dc:date>2021-04-23T13:09:33Z</dc:date>
    <item>
      <title>Data model _time field format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-model-time-field-format/m-p/549121#M155777</link>
      <description>&lt;P&gt;We are trying to create a data model with a custom _time field. We created the data model, and added a calculated field (SUBMIT_DATE_cron_e) that calculates a UNIX time with microseconds (like&amp;nbsp;&lt;SPAN&gt;1619093900.0043). We then created another calculated field called _time, and set this equal to&amp;nbsp;SUBMIT_DATE_cron_e. This effectively&amp;nbsp;overwrites the inherited (or original) _time field. These steps worked well.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A problem occurred&amp;nbsp;when setting the data model to accelerated. If I do a search on the data model during the acceleration build process, and I inspect the _time field, I see times in UNIX format with microseconds (like&amp;nbsp;1619093900.0043), as intended. However as the build progresses, the _time values change to UNIX time with no microseconds (like&amp;nbsp;1619093900). It looks like the _time field is truncated to have only seconds.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this according to design for accelerated data models? Is there a way to have a _time field in UNIX format with micro seconds?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 13:09:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-model-time-field-format/m-p/549121#M155777</guid>
      <dc:creator>BernardEAI</dc:creator>
      <dc:date>2021-04-23T13:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Data model _time field format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-model-time-field-format/m-p/594326#M206851</link>
      <description>&lt;P&gt;This is possible, but this approach requires a datamodel amendment.&lt;/P&gt;&lt;P&gt;If an ordinary search of the index showed timestamps with sub-seconds:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image001.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19135i667518D9BE31EBA6/image-size/large?v=v2&amp;amp;px=999" role="button" title="image001.png" alt="image001.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the equivalent tstats search did not:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image002.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19136i6D3D560C6D8B2795/image-size/large?v=v2&amp;amp;px=999" role="button" title="image002.png" alt="image002.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the workaround is to modify the datamodel to add another field which takes a copy of the full timestamp.&amp;nbsp; That additional field can either be retained like other fields or can be used to reinstate the timestamp with sub-second detail.&amp;nbsp; For example, create a calculated field “time_millis” that just takes a copy of _time.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image003.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19137iEA45E037B3912DD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="image003.png" alt="image003.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, if you return to&amp;nbsp; your tstats search from earlier and include time_millis, you can display time_millis and/or use it to reinstate the milliseconds of the _time field (i.e.&amp;nbsp; | eval _time=time_miilis):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image004.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19138iBA53AA9E2C31FB47/image-size/large?v=v2&amp;amp;px=999" role="button" title="image004.png" alt="image004.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 18:46:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-model-time-field-format/m-p/594326#M206851</guid>
      <dc:creator>easiedu_splunk</dc:creator>
      <dc:date>2022-06-13T18:46:21Z</dc:date>
    </item>
  </channel>
</rss>

