Splunk Search

Timechart time

darksky21
Path Finder

Hi i have a timechart

| timechart count by serial_number

is there a way to change the use of _time to another date field?

Tags (1)

norbert_hamel
Communicator

yes, you can use any other field which contains a time information:

| eval _time=MyTime

If MyTime is a text string, you can use strptime to convert the string to time. For example, if the MyTime is "03-22-2013 11:55":

| eval MyTimeDate=strptime(MyTime,"%m-%d-%Y %H:%M") | eval _time=MyTime

Ayn
Legend

Sure. timechart is, more or less, an alias for bucket _time | chart <functions> over _time so if you want to use another field, just do

`bucket yourfield | chart <functions> over yourfield`
Get Updates on the Splunk Community!

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...