Documentation

Time function

Time function is used to fetch the time, depending upon the parameter provided. For example : ${__time(Flexible hours, “Time Format”)} , here flexible hour is the increasing/decreasing time parameter . ‘0’ represents the current time, if you want a future time you can change this parameter to any positive value and in case you want any past time you can change the parameter to a negative value, depending upon your requirement.

Syntax: ${__time(0,”h:mm:ss a”)}

Edit parameter section and click on Form, select functions from the dropdown and select time function. Enter Time to add and Time format and click on save icon.

In the above snapshot, a local variable is set with value as current time.

After saving this step, it will look as below where a local variable output is assigned with current time.

You can also give minutes and seconds also along with the . Just use ‘@’ symbol in between the hour, minute and seconds.

Example: ${__time(2@30@45,”h:mm:ss a”)}, this will add 2 hours, 30 minutes and 45 seconds to the current date.

Example: ${__time(4@15,”h:mm:ss a”)}, this will add 4 hours and 15 minutes to the current date.

Once variable is assigned with time in the given format you can use it in your further steps.

Was this page helpful?