Splunk Search

Convert YYYYMMDD number to DD.MM.YYYY format

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

SplunkTrust
SplunkTrust

This should do the job.

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

View solution in original post

SplunkTrust
SplunkTrust

This should do the job.

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

View solution in original post

Communicator

Thanks alot!

0 Karma