Currently I have a field holding a Julian date. I am trying to convert it using strftime but i'm having issues.
Date = 2022.091
Current query:
index = * | eval ConvertedDate = strftime(DATE,"%Y.%j")| table ConvertedDate
Ideally I would like to get an output like 04/03/2022
Thank you,
Marco
The strftime function converts an epoch timestamp (integer) into a human-readable string. Use the strptime function to convert a datetime string into epoch form.
index = *
| eval ConvertedDate = strftime(strptime(DATE,"%Y.%j"), "%m/%d/%Y")
| table ConvertedDate
The strftime function converts an epoch timestamp (integer) into a human-readable string. Use the strptime function to convert a datetime string into epoch form.
index = *
| eval ConvertedDate = strftime(strptime(DATE,"%Y.%j"), "%m/%d/%Y")
| table ConvertedDate
@richgalloway This worked. Thank you for your time and explanation .
-Marco