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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...