Getting Data In

Timestamp format with leading hash sign, #Fri Aug 31 14:37:21 2012

jmgilpin
New Member

Any suggestions on the format that I could use to extract this timestamp?

#Fri Aug 31 14:37:21 2012

thanks,

James

0 Karma
1 Solution

vnravikumar
Champion

Hi

Check this

| makeresults 
| eval temp="#Fri Aug 31 14:37:21 2012" 
| eval epoch =strptime(temp,"#%a %b %d %H:%M:%S %Y") 
| eval result = strftime(epoch,"%d/%m/%Y %H:%M:%S")

View solution in original post

0 Karma

vnravikumar
Champion

Hi

Check this

| makeresults 
| eval temp="#Fri Aug 31 14:37:21 2012" 
| eval epoch =strptime(temp,"#%a %b %d %H:%M:%S %Y") 
| eval result = strftime(epoch,"%d/%m/%Y %H:%M:%S")
0 Karma

jmgilpin
New Member

thanks, works great inline

Also, for sourcetype, I used TIME_PREFIX=#

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...