Skip to main content
Question

Number of days between two dates. Example = (12/17/2022, 12/9/2021) = 373 days

  • December 17, 2022
  • 2 replies
  • 1321 views

Forum|alt.badge.img

How can we calculate number of days between two dates.

2 replies

Padmakumar
Forum|alt.badge.img+13
  • Navigator | Tier 3
  • 785 replies
  • December 17, 2022

Hi @kapil.k2 ,

 

You can do either of the below 3 methods.

  • Use a calendar table in a database

or

  • Use VB/Java/python script

or 

 

Hope of this will help.


Forum|alt.badge.img+19
  • Most Valuable Pathfinder
  • 2694 replies
  • December 17, 2022

Hi @kapil.k2 

  1. Use below botstore package for a simple solution.

https://botstore.automationanywhere.com/bot/automation-360-difference-between-two-dates-package

 

  1. Checkout below tutorial to import the bot package from botstore.

 

  1. Search for DifferencebetweenTwoDates package from the Actions pane
  2. You can retrieve the difference between two dates in days format by using the DifferenceBetweenTwoDates: Difference between two dates in Days command and provide the First Date and Second Date as well as the Date Format. The output should be assigned to a string variable as below

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings