Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do we convert unix time into string and string back to unix time format?



How do we convert unix time into string and string back to unix time format?..

Answer / Deepak Singh Rathore

In Splunk, you can convert Unix time to a readable date/time string using the strftime function (e.g., index=_internal| timechart span=1h by _time| eval date=`strftime("%Y-%m-%d %H:%M:%S",_time)`). To convert a string back to Unix time, use the strptime function (e.g., index=_internal | eval unixtime = strptime(date, "%Y-%m-%d %H:%M:%S")).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Splunk Interview Questions

What is a lookup command? Differentiate between inputlookup & outputlookup commands.

1 Answers  


How to remove duplicate events having common values?

1 Answers  


What are splunk buckets? Explain the bucket lifecycle?

1 Answers  


How to use btool for splunk conf file approach?

1 Answers  


Can you write down a general regular expression for extracting ip address from logs?

1 Answers  


Name the domain in which knowledge objects can be used?

1 Answers  


State the difference between stats and event stats commands?

1 Answers  


Name splunk alternatives?

1 Answers  


Define splunk?

1 Answers  


Which is latest splunk version in use?

1 Answers  


What are the unique benefits of getting data into a splunk instance via forwarders?

1 Answers  


What is global file precedence in Splunk?

1 Answers  


Categories