Skip to content

Get Time In Required Format Function: time

The Get Time in Required Format Function retrieves the time based on the given parameters, allowing you to adjust the time to a future or past value and specify the time format. You can also adjust hours, minutes, and seconds by separating them with the @ symbol.

Example: Suppose you want to calculate the time 1 hour, 20 minutes, and 10 seconds ahead of the current time in a 12-hour format with AM/PM.

Steps to Configure:

  1. Select Set a Variable Value from the Action dropdown.
  2. In the Element Key field, enter a variable name (e.g., AdjustedTime). This variable will store the calculated time.
  3. Click Form to open the configuration form.
    • From the dropdown, select Functions and choose Get Time in Required Format Function.
    • Provide the following parameters:
      • Time to Add: Enter 0 for the current time, a positive value for future time, or a negative value for past time. To adjust specific components, use the @ symbol. For example, 1@20@10 adds 1 hour, 20 minutes, and 10 seconds.
      • Time Format: Specify the time format (e.g., “hh:mm:ss a” for 12-hour format with AM/PM or “HH:mm:ss” for 24-hour format).
  4. Click Save.
scrn-get-time-in-required-format-tabular-view
Tabular View
scrn-get-time-in-required-format-card-view
Card View

Outcome on Execution:

  • The function calculates the adjusted time based on the specified parameters.
  • The calculated time is stored in the variable defined in the Element Key field (e.g., AdjustedTime).
  • You can reference this variable in subsequent automation steps using the syntax ${VariableName} (e.g., ${AdjustedTime}).

Back To Top