Reporting

how to get today in the report?

splunkambarish
New Member

how to get today date in the report .
I just need today date in one column and the time i will be using now()

Tags (1)
0 Karma

chinmoya
Communicator

Hi,

You can use the now() command provided by splunk to get the time of your server at that instance & use strftime command to evaluate today (%d) will give u todays date.

Below is an example:

| makeresults | eval Now =now() | eval today= strftime(Now,"%d-%m-%Y : %H:%M:%S") | table today

The parameters of strftime you can edit according to your need.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi splunkambarish,
could you share more details?
Bye.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...