<?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 can i extract date only from date field? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-can-i-extract-date-only-from-date-field/m-p/532010#M36171</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228691"&gt;@avneet26&lt;/a&gt;&amp;nbsp;you can use substr command-&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|eval errorOccuredOn=substr(errorOccuredOn,1,10)&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 04 Dec 2020 12:24:44 GMT</pubDate>
    <dc:creator>493669</dc:creator>
    <dc:date>2020-12-04T12:24:44Z</dc:date>
    <item>
      <title>how can i extract date only from date field?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-can-i-extract-date-only-from-date-field/m-p/532008#M36170</link>
      <description>&lt;P&gt;hi , the format of the field is&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="t"&gt;errorOccuredOn&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="t"&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="t"&gt;2020-12-04&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN class="t"&gt;01:00" and i want to extract only the date i.e. only 2020-12-04 should be coming into the result. Let me know how this can be achieved.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 12:08:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-can-i-extract-date-only-from-date-field/m-p/532008#M36170</guid>
      <dc:creator>avneet26</dc:creator>
      <dc:date>2020-12-04T12:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: how can i extract date only from date field?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-can-i-extract-date-only-from-date-field/m-p/532010#M36171</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228691"&gt;@avneet26&lt;/a&gt;&amp;nbsp;you can use substr command-&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|eval errorOccuredOn=substr(errorOccuredOn,1,10)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 04 Dec 2020 12:24:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-can-i-extract-date-only-from-date-field/m-p/532010#M36171</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2020-12-04T12:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: how can i extract date only from date field?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-can-i-extract-date-only-from-date-field/m-p/532011#M36172</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228691"&gt;@avneet26&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if you already have the field&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;errorOccuredOn and you need only to extract the date, you can use this regex:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex  field=errorOccuredOn "^(?&amp;lt;errorOccuredOn&amp;gt;\d+-\d+-\d+)"&lt;/LI-CODE&gt;&lt;P&gt;If instead you have to extract the field from the raw data, you can use the following regex&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\"errorOccuredOn\":\"(?&amp;lt;errorOccuredOn&amp;gt;\d+-\d+-\d+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/CRiDtQ/1" target="_blank"&gt;https://regex101.com/r/CRiDtQ/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Sorry, but did you open a new question instead continue the old one?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 12:25:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-can-i-extract-date-only-from-date-field/m-p/532011#M36172</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-12-04T12:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: how can i extract date only from date field?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-can-i-extract-date-only-from-date-field/m-p/532416#M36220</link>
      <description>&lt;P&gt;thanks it worked!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 05:17:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-can-i-extract-date-only-from-date-field/m-p/532416#M36220</guid>
      <dc:creator>avneet26</dc:creator>
      <dc:date>2020-12-09T05:17:04Z</dc:date>
    </item>
  </channel>
</rss>

