<?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: Please help with Date extraction from below string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Please-help-with-Date-extraction-from-below-string/m-p/590602#M205629</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244235"&gt;@bhaskar5428&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand: are you spoeaking of search time extraction or timestamp configuration?&lt;/P&gt;&lt;P&gt;if search time extraction, you could use a regex like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "^(?&amp;lt;date&amp;gt;\d\d\d\d-\d\d-\d\d)\s+(?&amp;lt;time&amp;gt;\d\d:\d\d:\d\d\.\d\d\d"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 24 Mar 2022 07:54:41 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-03-24T07:54:41Z</dc:date>
    <item>
      <title>Please help with Date extraction from below string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Please-help-with-Date-extraction-from-below-string/m-p/590588#M205622</link>
      <description>&lt;P&gt;i have system column "_time" with below output&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2022-03-16 11:12:18.723&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;i would like segregate date and time by rex command&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;output should be like this with new column name&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Date =&amp;nbsp;&lt;SPAN&gt;2022-03-16&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Time =&amp;nbsp;&lt;SPAN&gt;11:12:18&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 07:13:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Please-help-with-Date-extraction-from-below-string/m-p/590588#M205622</guid>
      <dc:creator>bhaskar5428</dc:creator>
      <dc:date>2022-03-24T07:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Please help with Date extraction from below string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Please-help-with-Date-extraction-from-below-string/m-p/590602#M205629</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244235"&gt;@bhaskar5428&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand: are you spoeaking of search time extraction or timestamp configuration?&lt;/P&gt;&lt;P&gt;if search time extraction, you could use a regex like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "^(?&amp;lt;date&amp;gt;\d\d\d\d-\d\d-\d\d)\s+(?&amp;lt;time&amp;gt;\d\d:\d\d:\d\d\.\d\d\d"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 07:54:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Please-help-with-Date-extraction-from-below-string/m-p/590602#M205629</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-24T07:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Please help with Date extraction from below string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Please-help-with-Date-extraction-from-below-string/m-p/590603#M205630</link>
      <description>&lt;P&gt;If it is already in the _time field, it is probably already in epoch time format, so try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Date=strftime(_time,"%F")
| eval Time=strftime(_time,"%T")&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 24 Mar 2022 07:57:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Please-help-with-Date-extraction-from-below-string/m-p/590603#M205630</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-24T07:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Please help with Date extraction from below string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Please-help-with-Date-extraction-from-below-string/m-p/590610#M205632</link>
      <description>&lt;P&gt;index=app_events_fx4cash_uk_prod source=*STPManager-servicemanagement.20220316-111218.log*&lt;BR /&gt;| rex field=_time "^(?&amp;lt;date&amp;gt;\d\d\d\d-\d\d-\d\d)\s+(?&amp;lt;time&amp;gt;\d\d:\d\d:\d\d\.\d\d\d"&lt;BR /&gt;| table date,time&lt;BR /&gt;&lt;BR /&gt;am using this but getting error&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Error in 'rex' command: Encountered the following error while compiling the regex '^(?&amp;lt;date&amp;gt;\d\d\d\d-\d\d-\d\d)\s+(?&amp;lt;time&amp;gt;\d\d:\d\d:\d\d\.\d\d\d': Regex: missing closing parenthesis.&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;The search job has failed due to an error. You may be able view the job in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Mar 2022 08:15:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Please-help-with-Date-extraction-from-below-string/m-p/590610#M205632</guid>
      <dc:creator>bhaskar5428</dc:creator>
      <dc:date>2022-03-24T08:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Please help with Date extraction from below string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Please-help-with-Date-extraction-from-below-string/m-p/590613#M205634</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244235"&gt;@bhaskar5428&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;sorry I missed a paranthesi at the end of the regex, please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=_time "^(?&amp;lt;date&amp;gt;\d\d\d\d-\d\d-\d\d)\s+(?&amp;lt;time&amp;gt;\d\d:\d\d:\d\d\.\d\d\d)"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 08:23:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Please-help-with-Date-extraction-from-below-string/m-p/590613#M205634</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-24T08:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Please help with Date extraction from below string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Please-help-with-Date-extraction-from-below-string/m-p/590615#M205636</link>
      <description>&lt;P class="lia-align-left"&gt;Thanks , it worked&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 08:26:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Please-help-with-Date-extraction-from-below-string/m-p/590615#M205636</guid>
      <dc:creator>bhaskar5428</dc:creator>
      <dc:date>2022-03-24T08:26:47Z</dc:date>
    </item>
  </channel>
</rss>

