Splunk Search

How to rename _time column

webnair
Explorer

How to rename the _time to TIME in the below query:

|inputlookup currentesdorders.csv | dedup ORDER_NUMBER | where ORDER_TOTAL =0 | fields ESD_ORDER CREATION_DATE | eval ESD_ORDER=if(ESD_ORDER="Y","ESD","Physical") | eval _time=CREATION_DATE | timechart span=1w count(CREATION_DATE) as count by ESD_ORDER

Tags (2)
1 Solution

Isaias_Garcia
Path Finder

try this

...| rename _time AS TIME

View solution in original post

Isaias_Garcia
Path Finder

try this

...| rename _time AS TIME

Isaias_Garcia
Path Finder

oh is see..same question was asked before.you may try this: http://answers.splunk.com/answers/1275/renaming-_time-field-causes-an-unwanted-result

webnair
Explorer

Thanks for the quick answer. Th ecolumn name changes but then the time gets converted to unix format.
Hiw do I retain the date format for example: 2014-03-27

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...