<?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 Search and Extract date from string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-and-Extract-date-from-string/m-p/554675#M157440</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I need some help in searching,&lt;/P&gt;&lt;P&gt;I have the following data :&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Field1&lt;/TD&gt;&lt;TD width="50%"&gt;Field2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-05-14X03:02:57Y&lt;/TD&gt;&lt;TD width="50%"&gt;Xa&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-05-13X05:12:13Y&lt;/TD&gt;&lt;TD width="50%"&gt;Xb&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-05-16X04:06:45Y&lt;/TD&gt;&lt;TD width="50%"&gt;Xc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I'd like to make a search that using the current date, assuming that today is 2021-05-16,&amp;nbsp;&lt;/P&gt;&lt;P&gt;if I run the search it shows the output&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-05-16X04:06:45Y&lt;/TD&gt;&lt;TD width="50%"&gt;Xc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so if the next day I run the search again, it will only return the 2021-05-17 data&lt;/P&gt;&lt;P&gt;Could someone help me on this?&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jun 2021 11:52:04 GMT</pubDate>
    <dc:creator>Laxman24</dc:creator>
    <dc:date>2021-06-07T11:52:04Z</dc:date>
    <item>
      <title>Search and Extract date from string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-and-Extract-date-from-string/m-p/554675#M157440</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I need some help in searching,&lt;/P&gt;&lt;P&gt;I have the following data :&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Field1&lt;/TD&gt;&lt;TD width="50%"&gt;Field2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-05-14X03:02:57Y&lt;/TD&gt;&lt;TD width="50%"&gt;Xa&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-05-13X05:12:13Y&lt;/TD&gt;&lt;TD width="50%"&gt;Xb&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-05-16X04:06:45Y&lt;/TD&gt;&lt;TD width="50%"&gt;Xc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I'd like to make a search that using the current date, assuming that today is 2021-05-16,&amp;nbsp;&lt;/P&gt;&lt;P&gt;if I run the search it shows the output&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-05-16X04:06:45Y&lt;/TD&gt;&lt;TD width="50%"&gt;Xc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so if the next day I run the search again, it will only return the 2021-05-17 data&lt;/P&gt;&lt;P&gt;Could someone help me on this?&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 11:52:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-and-Extract-date-from-string/m-p/554675#M157440</guid>
      <dc:creator>Laxman24</dc:creator>
      <dc:date>2021-06-07T11:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Search and Extract date from string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-and-Extract-date-from-string/m-p/554677#M157441</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227418"&gt;@Laxman24&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH
| where (strftime(now(),"%Y-%m-%d")=substr(Field1,0,10))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults |eval _raw="Field1	Field2
2021-05-14X03:02:57Y	Xa
2021-05-13X05:12:13Y	Xb
2021-06-07X04:06:45Y	Xc" | multikv forceheader=1
| where (strftime(now(),"%Y-%m-%d")=substr(Field1,0,10))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 12:01:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-and-Extract-date-from-string/m-p/554677#M157441</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-07T12:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Search and Extract date from string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-and-Extract-date-from-string/m-p/554701#M157445</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp; !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it seems worked! Thank you!!!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 14:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-and-Extract-date-from-string/m-p/554701#M157445</guid>
      <dc:creator>Laxman24</dc:creator>
      <dc:date>2021-06-07T14:14:02Z</dc:date>
    </item>
  </channel>
</rss>

