<?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 get the calender week from the date? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/657594#M54177</link>
    <description>&lt;P&gt;_time is already in epoch form so it does not need to be (and cannot be) converted using strptime.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval weeknum=strftime(_time, "%V")
| chart dc(Task_num) as Tasks over weeknum by STATUS&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 14 Sep 2023 12:13:21 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-09-14T12:13:21Z</dc:date>
    <item>
      <title>How to get the calender week from the date?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/657410#M54155</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I want to plot a chart according to the calendar week. I plotted a timechart like this,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|timechart span=7d distinct_count(Task_num) as Tasks by STATUS&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this doesn't give the exact calendar weeks. Also i am keeping this charts data to last 3 months.&lt;/P&gt;&lt;P&gt;Anyone have idea how to plot a bar chart based on calendar week? instead of date i want to see the data for current calendar weeks of last 3 months.&lt;/P&gt;&lt;P&gt;I got from the splunk community on how to get the Calendar week. But i am not to plot a graph out of it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval weeknum=strftime(strptime(yourdatefield,"%d-%m-%Y"),"%V")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 10:22:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/657410#M54155</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2023-09-13T10:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the calender week from the date?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/657416#M54158</link>
      <description>&lt;P&gt;Untested, but try the &lt;FONT face="courier new,courier"&gt;chart&lt;/FONT&gt; command.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval weeknum=strftime(strptime(yourdatefield,"%d-%m-%Y"),"%V")
| chart dc(Task_num) as Tasks over weeknum by STATUS&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 12:07:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/657416#M54158</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-09-13T12:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the calender week from the date?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/657522#M54163</link>
      <description>&lt;P&gt;Mt date field is _time. When i use this query i'm getting as no results found.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval weeknum=strftime(strptime(_time,"%d-%m-%Y"),"%V")
| chart dc(Task_num) as Tasks over weeknum by STATUS&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 03:56:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/657522#M54163</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2023-09-14T03:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the calender week from the date?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/657540#M54164</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;maybe you could try to get data by adding this into your base search ?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;earliest=-3mon@w+d latest=@w+d&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 06:56:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/657540#M54164</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-09-14T06:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the calender week from the date?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/657594#M54177</link>
      <description>&lt;P&gt;_time is already in epoch form so it does not need to be (and cannot be) converted using strptime.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval weeknum=strftime(_time, "%V")
| chart dc(Task_num) as Tasks over weeknum by STATUS&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 14 Sep 2023 12:13:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/657594#M54177</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-09-14T12:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the calender week from the date?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/657718#M54193</link>
      <description>&lt;P&gt;Thank you so much.. I totally forgot that it is already in epoch format.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 11:59:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/657718#M54193</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2023-09-15T11:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the calender week from the date?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/678435#M55559</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Is it possible to sort this according to the year? My search query i have set for last 3 months data, it is taking last years data. But in chart the calendar week 48,49 etc are coming at the end. But they should be in the beginning. I am trying out some solutions but not able to do it properly. Do you know any suggestion for this?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 08:44:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/678435#M55559</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2024-02-23T08:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the calender week from the date?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/678489#M55564</link>
      <description>&lt;P&gt;Numbers always sort in numerical order.&amp;nbsp; To change the order, change the numbers by adding the year to them.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval weeknum=strftime(_time, "%y-%V")
| chart dc(Task_num) as Tasks over weeknum by STATUS&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 23 Feb 2024 14:09:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/678489#M55564</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-02-23T14:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the calender week from the date?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/678766#M55596</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt; , i added the year and it is working fine now. I want to only show the calendar week in the chart, any solution for this?&lt;/P&gt;&lt;P&gt;What i understand is that we cannot change the labels.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 05:51:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/678766#M55596</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2024-02-27T05:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the calender week from the date?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/678823#M55600</link>
      <description>&lt;P&gt;It is true one cannot change the labels.&amp;nbsp; That means we have to choose between having week numbers in numerical rather than calendar order or having year-week numbers in calendar order.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 13:20:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-the-calender-week-from-the-date/m-p/678823#M55600</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-02-27T13:20:06Z</dc:date>
    </item>
  </channel>
</rss>

