Dashboards & Visualizations

Not able to get Date in proper format when put in Visualization

aditsss
Motivator

Hi Everyone,

I am using below query:

index=abc ns=uio app_nameapi "ARC EVENT RECEIVED FROM SOURCE"| rex "RID:(?<RID>(\w+-){4}\w+)-(?<sourceagent>\w+-\w+)"|timechart count(RID) as "RID" by sourceagent

when I put it in line chart I am getting dates like this:

Tue March 2

Wed March 3

I want it all in proper date format.

In statics its coming in date format but when I put in line chart . Not getting proper dates.

Can someone guide me on this.

Labels (3)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

It is not clear what you consider to be a proper time format.

_time is automatically formatted so you could rename it and specify the format you want

index=abc ns=uio app_nameapi "ARC EVENT RECEIVED FROM SOURCE"| rex "RID:(?<RID>(\w+-){4}\w+)-(?<sourceagent>\w+-\w+)"|timechart count(RID) as "RID" by sourceagent
| rename _time as time
| fieldformat time=strftime(time,"%Y/%m/%d")

 

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

It is not clear what you consider to be a proper time format.

_time is automatically formatted so you could rename it and specify the format you want

index=abc ns=uio app_nameapi "ARC EVENT RECEIVED FROM SOURCE"| rex "RID:(?<RID>(\w+-){4}\w+)-(?<sourceagent>\w+-\w+)"|timechart count(RID) as "RID" by sourceagent
| rename _time as time
| fieldformat time=strftime(time,"%Y/%m/%d")

 

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...