We have data fields in the format, for example, 12Jun22 I need to format like 12-06-2022
as shown in the below table:
date | expected format |
12Jun22 | 12-06-20222 |
13Jun22 | 13-06-2022 |
Splunk has the strptime and strftime functions for that purpose.
| eval date=strftime(strptime(date, "%d%b%y"), "%d-%m-%Y")
Thanks @richgalloway it worked!
Splunk has the strptime and strftime functions for that purpose.
| eval date=strftime(strptime(date, "%d%b%y"), "%d-%m-%Y")