<?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 Field will not convert time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-will-not-convert-time/m-p/538303#M152147</link>
    <description>&lt;P&gt;Hello Splunkers,&lt;/P&gt;&lt;P&gt;I have the following field with a date/time stamp:&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;2021-02-02 15:58:34.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;I am trying to convert it to a format such as:&amp;nbsp;&lt;SPAN&gt;1612279887.000&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;Ultimately it is my goal to use it in a calculation.&lt;BR /&gt;&lt;BR /&gt;I'm using the following search:&lt;BR /&gt;&lt;BR /&gt;search | fields status_dt&lt;BR /&gt;| table status_dt&lt;BR /&gt;| rename status_dt AS "x"&lt;BR /&gt;| eval y=strptime(x, "%m/%d/%y %H:%M:%S") | eval z= strftime(y,"%d %b %Y")&lt;BR /&gt;| table x y z&lt;BR /&gt;&lt;BR /&gt;But all I get is a table that looks like:&lt;BR /&gt;&lt;BR /&gt;x&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; z&lt;BR /&gt;&lt;SPAN&gt;2021-02-02 15:58:34.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong?&amp;nbsp; Thanks in advanced&lt;/P&gt;</description>
    <pubDate>Tue, 02 Feb 2021 16:29:51 GMT</pubDate>
    <dc:creator>jason_hotchkiss</dc:creator>
    <dc:date>2021-02-02T16:29:51Z</dc:date>
    <item>
      <title>Field will not convert time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-will-not-convert-time/m-p/538303#M152147</link>
      <description>&lt;P&gt;Hello Splunkers,&lt;/P&gt;&lt;P&gt;I have the following field with a date/time stamp:&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;2021-02-02 15:58:34.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;I am trying to convert it to a format such as:&amp;nbsp;&lt;SPAN&gt;1612279887.000&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;Ultimately it is my goal to use it in a calculation.&lt;BR /&gt;&lt;BR /&gt;I'm using the following search:&lt;BR /&gt;&lt;BR /&gt;search | fields status_dt&lt;BR /&gt;| table status_dt&lt;BR /&gt;| rename status_dt AS "x"&lt;BR /&gt;| eval y=strptime(x, "%m/%d/%y %H:%M:%S") | eval z= strftime(y,"%d %b %Y")&lt;BR /&gt;| table x y z&lt;BR /&gt;&lt;BR /&gt;But all I get is a table that looks like:&lt;BR /&gt;&lt;BR /&gt;x&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; z&lt;BR /&gt;&lt;SPAN&gt;2021-02-02 15:58:34.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong?&amp;nbsp; Thanks in advanced&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 16:29:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-will-not-convert-time/m-p/538303#M152147</guid>
      <dc:creator>jason_hotchkiss</dc:creator>
      <dc:date>2021-02-02T16:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Field will not convert time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-will-not-convert-time/m-p/538306#M152150</link>
      <description>&lt;P&gt;Your parse string doesn't match the date format you are using&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval y=strptime(x, "%Y-%m-%d %H:%M:%S")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 02 Feb 2021 16:50:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-will-not-convert-time/m-p/538306#M152150</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-02-02T16:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Field will not convert time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-will-not-convert-time/m-p/538307#M152151</link>
      <description>&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 16:58:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-will-not-convert-time/m-p/538307#M152151</guid>
      <dc:creator>jason_hotchkiss</dc:creator>
      <dc:date>2021-02-02T16:58:29Z</dc:date>
    </item>
  </channel>
</rss>

