Read and Review Automation Anywhere Documentation

Automation Anywhere Version 11.3

Close Contents

Contents

Open Contents

Date and Time System Variables

  • Updated: 5/06/2020
    • 11.3.x
    • Explore
    • Enterprise

Date and Time System Variables

You can use the set of Date and Time system variables to insert or monitor the current date and time of a system as your automation task runs.

Use Case Scenario

Using Date/Time variables can help you track and log points in time to monitor the success or error of a running process.

To view the system variables and their descriptions, follow these steps:

  1. In the Workbench, click the Variable Manager icon at the top or on the tab on the right side.
  2. Click on the "Show System Variables" link.

To insert a Date/Time system variable, follow these steps:

  1. In the Workbench, drag a Variable Operation command in the task pane.
  2. Select the System Variables radio button.
  3. In the drop-down menu, select the system variable that you want to insert.
  4. Click Save.

Manage your Date/Time variables by using the options listed in the table. The table shows Date/Time system variable names, return values, and actions.

For the Date variable, you can use the System Variables window to change the format that is returned in the Date variable. Follow these steps:

  1. In the Workbench, click the Variable Manager icon at the top or on the tab on the right side.
  2. Click on the "Show System Variables" link.
  3. Select the Date variable from the Date/Time list of variables and click the ... button.
  4. Select the date format in the Select Date Format pop-up window.

Examples:

  1. The following command stores the current DATE, DAY, and YEAR path in a log file. This is important while logging of errors or certain important information on files to include the date stamp.
    1. Drag and drop the Log To File command.
    2. Use the F2 function key to insert variables for $Date$, $Day$ and $Year$.
      Command:
      Log to File: Date:$Date$Day:$Day$Year:$Year$ in
      "C:\Variable Operation.txt"
  2. The following command stores the current HOUR, MINUTE, and SECONDS in a log file. This adds the timestamp to the log for analysis.
    1. Drag and drop the Log To File command.
    2. Use the F2 function key to insert variables for $Hour$, $Minute$, and $Seconds$.
      Command:
      Log to File:
      Hour:$Hour$Minute:$Minute$Seconds:$Second$ in "C:\Variable
      Operation.txt"
Send Feedback