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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...