Date function

This function is used to fetch the date, depending upon the parameter given. For example : ${__date(Adjustment days,”Date format”)}, here adjustment days is a parameter. Like “0” represents the current date, if you want a future date you can change this parameter to any positive value and in case you want any past date you can change the parameter to a negative value, depending upon your requirement.

Syntax: ${__date(0,”MM/dd/yyyy”)}

Edit parameter section and click on Form, select functions from the dropdown and select date function. Enter required values.

After completing this step, test step will look as below:

Example: ${__date(0,”dd/MM/yyyy”)} ==> 16/09/2018 [current date]

Example: ${__date(10,”dd/MM/yyyy”)} ==> 26/09/2018 [current date + 10 days]

Link for date format Description :

Was this page helpful?