Getting Data In

Need Time_Format value

VijaySrrie
Builder
Hi, I have two different time values 2020-06-24 03:07:39,997Z 2020-06-24 03:07:39.990Z The first value has a comma(,) and the second value has a dot(.) How can I parse both the values. Any documentation on this?
Labels (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @VijaySrrie ,

you can leave Splunk to use the correct Time format without forcing a TIME_FORMAT in props.conf.

If Splunk doesn't know one of them add it to datetime.xml following the instructions at https://docs.splunk.com/Documentation/SplunkCloud/8.0.2004/Data/Configuredatetimexml

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @VijaySrrie ,

you can leave Splunk to use the correct Time format without forcing a TIME_FORMAT in props.conf.

If Splunk doesn't know one of them add it to datetime.xml following the instructions at https://docs.splunk.com/Documentation/SplunkCloud/8.0.2004/Data/Configuredatetimexml

Ciao.

Giuseppe

gcusello
SplunkTrust
SplunkTrust

Hi @VijaySrrie ,

Perfect!

If you appreciate this solution you can also leave a Karma Point .

Ciao and next time.

Giuseppe

kamlesh_vaghela
SplunkTrust
SplunkTrust

@VijaySrrie 

 

You can go through this link.

https://docs.splunk.com/Documentation/Splunk/8.0.4/SearchReference/Commontimeformatvariables

Please  check my sample search with your provided data.

 

| makeresults | eval date="2020-06-24 03:07:39,997Z|2020-06-24 03:07:39.990Z" , date=split(date,"|") | mvexpand date | eval epochtime = strptime(date,"%Y-%m-%d %M:%H:%S,%3QZ")  | eval ReIterated = strftime(epochtime,"%Y-%m-%d %M:%H:%S,%3QZ") | table date epochtime ReIterated

 

Hope this will help you.

 

Thanks
Kamlesh Vaghela

0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...