Skip to main content

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?

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.


Thanks for the insight @Aaron.Gleason.


Reply