Question

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

  • 17 December 2022
  • 2 replies
  • 931 views

Badge

How can we calculate number of days between two dates.


2 replies

Userlevel 7
Badge +13

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.

Userlevel 6
Badge +16

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

 

 

Reply