<?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 Color code  for date column not working in Splunk dashboard in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Color-code-for-date-column-not-working-in-Splunk-dashboard/m-p/752629#M59144</link>
    <description>&lt;P&gt;Hi Team,&lt;BR /&gt;&lt;BR /&gt;I'm trying to color code Date column in Table visualization based on nested if condition. But, it isn't working. Kindly assist to fix this issue&lt;BR /&gt;&lt;BR /&gt;Sample code:&lt;BR /&gt;&amp;lt;/format&amp;gt;&lt;BR /&gt;&amp;lt;format type="color" field="Batch_Date"&amp;gt;&lt;BR /&gt;&amp;lt;colorPalette type="expression"&amp;gt;if(strptime(Batch_Date, "%d-%m-%Y") &amp;amp;lt;= relative_time(now(), "-1d@d"), "#55C169", "#ffffff")&amp;lt;/colorPalette&amp;gt;&lt;BR /&gt;&amp;lt;/format&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Siddarth&lt;/P&gt;</description>
    <pubDate>Wed, 03 Sep 2025 06:37:04 GMT</pubDate>
    <dc:creator>Splunk_sid</dc:creator>
    <dc:date>2025-09-03T06:37:04Z</dc:date>
    <item>
      <title>Color code  for date column not working in Splunk dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Color-code-for-date-column-not-working-in-Splunk-dashboard/m-p/752629#M59144</link>
      <description>&lt;P&gt;Hi Team,&lt;BR /&gt;&lt;BR /&gt;I'm trying to color code Date column in Table visualization based on nested if condition. But, it isn't working. Kindly assist to fix this issue&lt;BR /&gt;&lt;BR /&gt;Sample code:&lt;BR /&gt;&amp;lt;/format&amp;gt;&lt;BR /&gt;&amp;lt;format type="color" field="Batch_Date"&amp;gt;&lt;BR /&gt;&amp;lt;colorPalette type="expression"&amp;gt;if(strptime(Batch_Date, "%d-%m-%Y") &amp;amp;lt;= relative_time(now(), "-1d@d"), "#55C169", "#ffffff")&amp;lt;/colorPalette&amp;gt;&lt;BR /&gt;&amp;lt;/format&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Siddarth&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2025 06:37:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Color-code-for-date-column-not-working-in-Splunk-dashboard/m-p/752629#M59144</guid>
      <dc:creator>Splunk_sid</dc:creator>
      <dc:date>2025-09-03T06:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Color code  for date column not working in Splunk dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Color-code-for-date-column-not-working-in-Splunk-dashboard/m-p/752646#M59145</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260328"&gt;@Splunk_sid&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to use 'value' instead of the field name:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        &amp;lt;colorPalette type="expression"&amp;gt;if(strptime(value, "%d-%m-%Y") &amp;amp;lt;= relative_time(now(), "-1d@d"), "#55C169", "#ffffff")&amp;lt;/colorPalette&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="livehybrid_0-1756897849638.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/40162i76B1FF603296738D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="livehybrid_0-1756897849638.png" alt="livehybrid_0-1756897849638.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Full example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard version="1.1" theme="light"&amp;gt;
  &amp;lt;label&amp;gt;FieldBGColourEval&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;|makeresults | eval Batch_Date="02-09-2025"&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;format type="color" field="Batch_Date"&amp;gt;
        &amp;lt;colorPalette type="expression"&amp;gt;if(strptime(value, "%d-%m-%Y") &amp;amp;lt;= relative_time(now(), "-1d@d"), "#55C169", "#ffffff")&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2025 11:11:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Color-code-for-date-column-not-working-in-Splunk-dashboard/m-p/752646#M59145</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-09-03T11:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Color code  for date column not working in Splunk dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Color-code-for-date-column-not-working-in-Splunk-dashboard/m-p/752725#M59149</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170906"&gt;@livehybrid&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thank you very much. I got the required result now. However, I see one issue here. When I try to clone this to Dashboard Studio, this particular color formatting didn't get converted . Can you suggest a way to make it work ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Siddarth&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2025 04:10:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Color-code-for-date-column-not-working-in-Splunk-dashboard/m-p/752725#M59149</guid>
      <dc:creator>Splunk_sid</dc:creator>
      <dc:date>2025-09-05T04:10:44Z</dc:date>
    </item>
  </channel>
</rss>

