Hi,
An application outputs a processingtime information in "SS:%3N" format (e.g. "3.241" = 3.241 seconds )
Is there a way to convert the string to milliseconds value?
Thanks,
Hiroshi
| eval processingtimems=processingtime*1000
Oops, there was a typo.
Example log message is 3:241 (not 3.241).
It's %S.%3Q to get seconds.miliseconds
http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/Commontimeformatvariables
You may need to convert from string to a double first using convert or eval with strftime /strptime:
http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/Convert
http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/CommonEvalFunctions
Thanks for your comments.
Original log message is using ":", like 3:241
Could you give me an example usage of strftime / strptime for how to convert "3:241" string to a double?
Thanks,