Getting Data In

how to set a timestamp that is in brackets?

a212830
Champion

Hi,

How would I set the timestamp for a feed that starts with the timestamp in brackets? How do I tell it to ignore the brackets on each end?

[Tue Dec 18 18:42:31 2012]

Tags (1)
0 Karma

yannK
Splunk Employee
Splunk Employee

If the timestamp is detected, it will ignore them, simply because at index time the timestamp is internally converted to an epoch time (in seconds) and displayed in the timezone of your search-head / project.

If you want to manually extract the timestamp at search time, like with a field extraction, you can parse it as you want.

example

| rex field=mytimestamp mode=sed "/s/\[\]//g" | table mytimestamp

or

| rex field=_raw "\[(?< mytimestamp >.*)\]" | table mytimestamp

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...