Dashboards & Visualizations

How to fetch date field from raw logs?

aditsss
Motivator
Hi Team,
 
How can I fetch raw log
 
2023-07-13 02:37:14.317 [INFO ] [pool-2-thread-1] FileSensor - Total msg processed for trim reage file:241
Labels (3)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

| rex "^(?<date>\d{4}-\d{2}-d{2})"

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

If you have configured your sourcetype correctly, the _time field should have picked up the timestamp. Please check that this is the case.

0 Karma

aditsss
Motivator

@ITWhisperer 

I want to extract date please guide.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

| rex "^(?<date>\d{4}-\d{2}-d{2})"

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

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

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...