All Apps and Add-ons

Extract only the date from Datetime Sideview Utils

JaideepK
Explorer

I am using the Datetime module of sideview utils. I need to extract the date. How can I do that?.
I am using the earliest and latest parameter to set 'From' and to 'Date' range

Ex: current Date: 05/30/2014 00:00:00
I need the final result as >> current Date: 05/30/2014

Below is the Code I am using

<module name="Search" layoutPanel="panel_row12_col2_grp1" autoRun="True">
  <param name="search">| stats count | fields - count | addinfo | rename info_min_time as earliest info_max_time as latest</param>

  <param name="earliest">-14d@d</param>
  <param name="latest">-1d@d</param>

  <module name="ResultsValueSetter">
    <param name="fields">earliest, latest</param>   

    <module name="Search">
      <param name="earliest">$earliest$</param>
      <param name="latest">$latest$</param>

      <module name="DateTime" layoutPanel="panel_row2_col2_grp1">
        <param name="label">From</param>
        <param name="name">earliest</param>

        <module name="DateTime" layoutPanel="panel_row2_col2_grp1">
          <param name="label">Thru</param>
          <param name="name">latest</param>
        </module>
     </module>
  </module> 
</module>
0 Karma

sideview
SplunkTrust
SplunkTrust

You can add

<param name="showTimepicker">False</param>

to both of the DateTime modules. That will tell it both that the widget should have only a date component and no time component, and that it should display the selection only with the date component.

n

Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Your Voice Matters! Help Us Shape the New Splunk Lantern Experience

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Building Momentum: Splunk Developer Program at .conf25

At Splunk, developers are at the heart of innovation. That’s why this year at .conf25, we officially launched ...