<?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: How to convert date time format from my log parser to Splunk? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250980#M48329</link>
    <description>&lt;P&gt;Could you provide the current value of timestamp that you're getting now and what you want to it to transform into (with actual examples)?&lt;/P&gt;</description>
    <pubDate>Wed, 18 May 2016 14:28:48 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-05-18T14:28:48Z</dc:date>
    <item>
      <title>How to convert date time format from my log parser to Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250975#M48324</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am converting all statements from my log parser tool to Splunk. I didn't get the exact conversion for date and time timezone format.&lt;/P&gt;

&lt;P&gt;Please find my search here from log parser.&lt;/P&gt;

&lt;P&gt;Log parser:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TO_LOCALTIME(QUANTIZE(TO_TIMESTAMP(date, time), 1)) as Second, COUNT(*) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to convert above statement into Splunk syntax format.&lt;/P&gt;

&lt;P&gt;Please help me on this.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2016 14:48:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250975#M48324</guid>
      <dc:creator>guruwells</dc:creator>
      <dc:date>2016-05-16T14:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date time format from my log parser to Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250976#M48325</link>
      <description>&lt;P&gt;How does your timestamp looks like , samples?? (you probably need to use function strptime)&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2016 15:33:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250976#M48325</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-05-16T15:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date time format from my log parser to Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250977#M48326</link>
      <description>&lt;P&gt;Thanks for the reply. I am looking for date format which is " 2015-06-15 00:00*&lt;EM&gt;:01&lt;/EM&gt;*". something I need to seconds data.&lt;/P&gt;

&lt;P&gt;Let me know if you need any info on this.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:42:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250977#M48326</guid>
      <dc:creator>guruwells</dc:creator>
      <dc:date>2020-09-29T09:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date time format from my log parser to Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250978#M48327</link>
      <description>&lt;P&gt;YOu would need to use strptime funtion like this (run anywhere sample, replace line 1 with your search. Mine just generates dummy row)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval YourDateField="2015-06-15 00:00:01" | table YourDateField
| eval YourDateInEpoch=strptime(YourDateField,"%Y-%m-%d %H:%M:%S")   
| eval YourSecondPart=strftime(YourDateInEpoch,"%S")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 May 2016 16:29:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250978#M48327</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-05-16T16:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date time format from my log parser to Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250979#M48328</link>
      <description>&lt;P&gt;Thanks for the quick reply on this. It's really appreciated. what I am doing here is. I am pulling iis log information. I have separate fields which are date and time from my log.  first thing is I need to get date and time and same time I need to convert that date into local time.&lt;BR /&gt;
 TO_LOCALTIME(QUANTIZE(TO_TIMESTAMP(date, time), 1)) as Second&lt;/P&gt;

&lt;P&gt;Your help is appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:42:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250979#M48328</guid>
      <dc:creator>guruwells</dc:creator>
      <dc:date>2020-09-29T09:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date time format from my log parser to Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250980#M48329</link>
      <description>&lt;P&gt;Could you provide the current value of timestamp that you're getting now and what you want to it to transform into (with actual examples)?&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 14:28:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250980#M48329</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-05-18T14:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date time format from my log parser to Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250981#M48330</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Thanks for the reply. My time format in log file is "2016-01-10 08:00:00 ( Pacific time) and I wanted to convert date and time into Eastern time ( example: 2016-01-10 00:00:00). In above statement I am trying to convert server time to local time. &lt;/P&gt;

&lt;P&gt;is this information is good enough?. date and time field are seperate fields here.&lt;BR /&gt;
One more question is here: shall we use "_time" field to retrieve data?&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 11:35:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-date-time-format-from-my-log-parser-to-Splunk/m-p/250981#M48330</guid>
      <dc:creator>guruwells</dc:creator>
      <dc:date>2016-05-19T11:35:05Z</dc:date>
    </item>
  </channel>
</rss>

