Solved

Determining Elapsed Time

  • 20 November 2023
  • 2 replies
  • 133 views

Userlevel 3
Badge +9

What are your best practices for determining elapsed time in Automation Anywhere?

Let’s say a bot begins at 11:30pm on December 31, 2023. The bot finishes at 4:00am on January 1, 2024. It had a total runtime of 4 hours, 30 minutes.

How would you programmatically determine the elapsed time in the bot editor using the Datetime packages?

I can make an elaborate block of code with some if/then’s and type conversions between datetime and number values.

 

But is there a simpler way?

icon

Best answer by Aaron.Gleason 5 December 2023, 20:27

View original

2 replies

Userlevel 4
Badge +6

I might recommend looking at the Date and Time Utilities package on the Bot Store.

https://botstore.automationanywhere.com/bot/date-and-time-utilities-package

It has the ability to take two datetime variables and calculate the difference between the dates. It also has a “Stopwatch Start” and “Stopwatch Stop” function that might work for you.

Userlevel 3
Badge +9

Thanks for the insight @Aaron.Gleason.

Reply