<?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: Timestamp to date conversion in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-to-date-conversion/m-p/517196#M87527</link>
    <description>&lt;P&gt;You need to use str&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;p&lt;/FONT&gt;&lt;/STRONG&gt;time to parse the string to retrieve the time value, providing the format so:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;eval time=strptime(EMPTY_DATE,"%Y-%m-%d %H:%M:%S.%Q")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Sep 2020 09:35:54 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2020-09-01T09:35:54Z</dc:date>
    <item>
      <title>Timestamp to date conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-to-date-conversion/m-p/517195#M87526</link>
      <description>&lt;P&gt;I struggle with converting a time stamp into a date. In my data EMPTY_DATE looks like this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;2020-08-27 00:00:00.0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the following:&lt;/P&gt;&lt;P&gt;| convert timeformat="%m/%d/%Y" ctime(EMPTY_DATE) AS date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...and this:&lt;/P&gt;&lt;P&gt;|eval date=strftime(EMPTY_DATE, "%m/%d/%Y")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...and this:&lt;BR /&gt;| eval time=strptime(EMPTY_DATE,"%Y%m%dT%H:%M:%S.%Q") | convert timeformat="%d%m%Y" ctime(time) as date |&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All of the above returns empty columns. I don't know if it's because it doesn't recognize my time stamp or something else?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 09:27:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-to-date-conversion/m-p/517195#M87526</guid>
      <dc:creator>nc-mvw</dc:creator>
      <dc:date>2020-09-01T09:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp to date conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-to-date-conversion/m-p/517196#M87527</link>
      <description>&lt;P&gt;You need to use str&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;p&lt;/FONT&gt;&lt;/STRONG&gt;time to parse the string to retrieve the time value, providing the format so:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;eval time=strptime(EMPTY_DATE,"%Y-%m-%d %H:%M:%S.%Q")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 09:35:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-to-date-conversion/m-p/517196#M87527</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-01T09:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp to date conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-to-date-conversion/m-p/517198#M87529</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225669"&gt;@nc-mvw&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Using this, you get the &lt;EM&gt;time&lt;/EM&gt; as epoch and assigning the &lt;EM&gt;date&lt;/EM&gt; out of &lt;EM&gt;time&lt;/EM&gt; to the date field:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval time=strptime(EMPTY_DATE,"%Y-%m-%d %H:%M:%S.%Q")
| eval date = strftime(time,"%Y-%m-%d")&lt;/LI-CODE&gt;&lt;P&gt;BR&lt;BR /&gt;Ralph&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 09:40:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-to-date-conversion/m-p/517198#M87529</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2020-09-01T09:40:34Z</dc:date>
    </item>
  </channel>
</rss>

