Jmeter Example of __time function

I needed to pass the current date and time in a particular format in a jmeter webservice call. The format was year month day hour minutes seconds as a numeric and concatentated e.g. 13th Nov 2012 17:00 would by 20121113170000. Luckly the __time function in Jmeter can help . This is the code that I used to generate the date and time.

${__time(yyyyMMddHMS)

If you want to save the value as a variable just do the following

${__time(yyyyMMddHMS,DateVariable)

Advertisements

2 thoughts on “Jmeter Example of __time function

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s