Splunk Search

Convert YYYYMMDD number to DD.MM.YYYY format

ckunath
Communicator

Hello,

I am trying to convert a field value which contains a number in timeformat YYYYMMDD to DD.MM.YYYY

I tried several converting methods but it always end up with a whacky date, not the one that I require.

Can anyone help me out?

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

This should do the job.

... | eval bar=strftime(strptime(foo, "%Y%m%d"),"%d.%m.%Y") | ...
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

This should do the job.

... | eval bar=strftime(strptime(foo, "%Y%m%d"),"%d.%m.%Y") | ...
---
If this reply helps you, Karma would be appreciated.

ckunath
Communicator

Thanks alot!

0 Karma
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...