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 Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...