4
votes

I am using JMeter in Non-GUI mode and able to generate the .csv and .jtl files but the timestamp in the results file is in Epoch format and I want it to be in date (yyyy/MM/dd HH:mm:ss) format.

I did go to the /bin/user.properties file and made the necessary changes, but still the report looks same as before and has the timestamp in epoch format. This is what my user.properties looks like

jmeter.save.saveservice.bytes = true
# Only available with HttpClient4
#jmeter.save.saveservice.sent_bytes=true
jmeter.save.saveservice.label = true
jmeter.save.saveservice.latency = true
jmeter.save.saveservice.response_code = true
jmeter.save.saveservice.response_message = true
jmeter.save.saveservice.successful = true
jmeter.save.saveservice.thread_counts = true
jmeter.save.saveservice.thread_name = true
jmeter.save.saveservice.time = true
jmeter.save.saveservice.connect_time = true
# the timestamp format must include the time and should include the date.
# For example the default, which is milliseconds since the epoch: 
#jmeter.save.saveservice.timestamp_format = ms
# Or the following would also be suitable
jmeter.save.saveservice.timestamp_format = yyyy/MM/dd HH:mm:ss
1
Did you restart JMeter after that? Did you use yyyy/MM/dd HH:mm:ss or ddmmyyyy as mentioned in the question? - Naveen Kumar R B
@Naveen All this is done in Non-GUI mode and so there is no questions on restarting the JMeter, Right? And for the date format, I have edited the question to reflect the same format in both the places. - A-D
yeah! my bad. no need of restarting it in Non-GUI mode. I tried with your settings and it is working for me. could you please share the command that you ran and JMeter version. - Naveen Kumar R B
@Naveen This is the command i used to run the JMeter test jmeter -n -t "PATH TO JMX" -l "OutputFile.csv" and i am using apache-jmeter-3.1 - A-D
I don't see any wrong-doing here. because I tried with same version and similar command. working fine for me. better confirm the issue by running in GUI mode once. - Naveen Kumar R B

1 Answers

4
votes

Double check your user.properties file, maybe you have a duplicate property somewhere and JMeter picks the one it finds first. Another assumption: try removing starting (and ending, if any) whitespace, maybe the property cannot be parsed as a valid SimpleDateFormat pattern, check jmeter.log file for any suspicious entries

As a workaround you can override the timestamp format via -J command-line argument like:

jmeter -Jjmeter.save.saveservice.timestamp_format="yyyy/MM/dd HH:mm:ss" -n -t example.jmx -l example.csv

Demo:

JMeter property override timestamp

More information on working with JMeter Properties: Apache JMeter Properties Customization Guide