Splunk Infrastructure Overview — Question 18

Which of the following functions' primary purpose is to convert epoch time to a string format?

Answer options

Correct answer: D

Explanation

The correct answer is D, strftime, as it formats time into a string based on specified format codes. Option A, tostring, is used for converting data types to strings, but not specifically for time. Option B, strptime, is used for parsing strings into time objects, and option C, tonumber, converts strings to numbers, which is unrelated to time conversion.