Splunk Search

How to convert julian date to dd/mm/Y

kavyamohan
Explorer

SVSCPLEX,S0W1,S0W1.DAL-EBIS.IHOST.COM,SYSLOG,zOS-SYSLOG-Console,SYSLOG,-0400,NE,001C,19283 01.21.46.880 -0500,S0W1 ,JOB03487, ,40000000000000000000000000000000,00000090,TESCREAT,00," IEF450I TESCREAT STEP010 - ABEND=S222 U0000 REASON=00000000"\n.

where, 19283 is julian date. I need to convert this to dd/mm/Y Is that possible?

Tags (2)
0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

@kavyamohan

Can you please try this?

| makeresults 
| eval jdate="19283",epoch_date=strptime(jdate,"%y%j"),date=strftime(epoch_date,"%d/%m/%Y") | table jdate date

View solution in original post

kamlesh_vaghela
SplunkTrust
SplunkTrust

@kavyamohan

Can you please try this?

| makeresults 
| eval jdate="19283",epoch_date=strptime(jdate,"%y%j"),date=strftime(epoch_date,"%d/%m/%Y") | table jdate date

kavyamohan
Explorer

Thanks, it worked

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Glad to help you.

Happy Splunking

0 Karma

kavyamohan
Explorer

yes i have updated question

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@kavyamohan

Need more clarity:

As per the http://www.longpelaexpertise.com/toolsJulian.php .

Julian Date: 19283
which is Date: 10-Oct-2019. It is giving the only date not %H:%M:%S . Can you please let us know your expected output ??

0 Karma

kavyamohan
Explorer

Sorry. It was my mistake. I need Julian Date: 19283 to this format 10/10/2019

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

It would be really helpful for others if you update the question. 🙂

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...