<?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 Time Format conversion using strptime in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Time-Format-conversion-using-strptime/m-p/36394#M6637</link>
    <description>&lt;P&gt;I have a date timestamp coming in as a string in this format &lt;BR /&gt;
2012-08-08 11:29:03.727000000&lt;/P&gt;

&lt;P&gt;This is extracted as a field called createDtTimeStamp&lt;/P&gt;

&lt;P&gt;I want to simply extract JUST the date part from this field and use the following query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval createDt = strftime( strptime( createDtTimeStamp, "%b %d %H:%M:%S" ), "%m/%d/%Y %p")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This does not seem to work. Any ideas why ? &lt;/P&gt;</description>
    <pubDate>Wed, 15 Aug 2012 21:38:36 GMT</pubDate>
    <dc:creator>asarolkar</dc:creator>
    <dc:date>2012-08-15T21:38:36Z</dc:date>
    <item>
      <title>Time Format conversion using strptime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-Format-conversion-using-strptime/m-p/36394#M6637</link>
      <description>&lt;P&gt;I have a date timestamp coming in as a string in this format &lt;BR /&gt;
2012-08-08 11:29:03.727000000&lt;/P&gt;

&lt;P&gt;This is extracted as a field called createDtTimeStamp&lt;/P&gt;

&lt;P&gt;I want to simply extract JUST the date part from this field and use the following query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval createDt = strftime( strptime( createDtTimeStamp, "%b %d %H:%M:%S" ), "%m/%d/%Y %p")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This does not seem to work. Any ideas why ? &lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2012 21:38:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-Format-conversion-using-strptime/m-p/36394#M6637</guid>
      <dc:creator>asarolkar</dc:creator>
      <dc:date>2012-08-15T21:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Time Format conversion using strptime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-Format-conversion-using-strptime/m-p/36395#M6638</link>
      <description>&lt;P&gt;Well your format string seems to be off. &lt;CODE&gt;%b&lt;/CODE&gt; is "Locale’s abbreviated month name." which does not match 2012-08-08. You'll likely want something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval createDt = strftime(strptime(createDtTimeStamp,"%Y-%m-%d %H:%M:%S"),"%m/%d/%Y %p")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Aug 2012 22:01:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-Format-conversion-using-strptime/m-p/36395#M6638</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-08-15T22:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Time Format conversion using strptime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-Format-conversion-using-strptime/m-p/36396#M6639</link>
      <description>&lt;P&gt;worked like a charm !&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2012 23:27:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-Format-conversion-using-strptime/m-p/36396#M6639</guid>
      <dc:creator>asarolkar</dc:creator>
      <dc:date>2012-08-15T23:27:33Z</dc:date>
    </item>
  </channel>
</rss>

