java - Jmeter - Future timestamp -
Trying to create a parameter in the jacketer that gives the current timestamp + 5 minutes Does anyone have to do this ? I have this to create the current timestamp: $ {__ time (hh: mm: ss, timestamp)}
I'm afraid the function does not provide sufficient flexibility.
import will look like java.text.SimpleDateFormat will need to calculate this date value; Import java.util.Calendar; Import java.util.Date; Date now = new date (); // Current time calendar c = Calendar.getInstance (); // Get the Java Calendar Example c.setTime (now); // Set calendar time for now c.add (calendars, minutes, 5); // Add 5 minutes to the current time date now_plus_5_minutes = c.getTime (); // Receive date value for modified time SimpleDateFormat sdf = New SimpleDateFormat ("HH: mm: ss"); // Create formatting for date string mydate = sdf.format (now_plus_5_minutes); // date of format as "string wars.ppt" ("mite", maidet);
You will be able to refer to the mydate
value
- . $ {Mydate}
- $ {__V (mydate)}
In place you will need to provide that up to date date.
Hope it helps
Comments
Post a Comment