Date Difference
Last updated
Was this helpful?
Last updated
Was this helpful?
This is a pre-built action in Avo Assure which is Located under the @Generic element category. The difference can be found between a date and a few days or between two dates, and the resultant date or no. of days is stored in an output variable.
Input: <date>; <number of days OR date>; <current date format>
Supported date formats:
1. dd/MM/yyyy
2. dd/MMM/yyyy
Output: <Dynamic Variable> ;< Dynamic Variable> (Optional)
Consider a scenario where you are testing a subscription service’s web application. The service provides users with the ability to see how many days are overdue after their subscription expires. You are testing the functionality of the Overdue field on your dashboard. It verifies that the number of days after a subscription expires is calculated correctly using the date difference action. This means calculating the difference between the subscription expiry date and the Current date and checking if it matches the expected output shown in the application.
Input Data: Basic Subscription Duration calculation
Subscription End Date: 31/10/2024
Current Date: 25/10/2024
Expected Output: It verifies the difference between the current date and the subscription expiry date, determines the number of days remaining and displays the result as Days left = 06 days.
Output: The action performed and saves the resultant no.of days in {result}output variable as 06.
Description and Usage: This is a pre-built action in Avo Assure which is Located under the @Generic element category. The difference can be found between a date and a few days or between two dates, and the resultant date or no. of days is stored in an output variable.
Syntax:
Input: <date>; <number of days OR date>; <current date format>
Supported date formats:
1. dd/MM/yyyy
2. dd/MMM/yyyy
Output: <Dynamic Variable> ;< Dynamic Variable> (Optional)
Use case/Example:
Scenario: Verify Subscription Days Left
Consider a scenario where a user is testing a subscription service’s web application. The service provides users with the ability to see how many days are overdue after their subscription expires. They are testing the functionality of the Overdue field on their dashboard. It verifies that the number of days after a subscription expires is calculated correctly using the date difference action. This means calculating the difference between the subscription expiry date and the Current date and checking if it matches the expected output shown in the application.
Input Data: Basic Subscription Duration calculation
Subscription End Date: 31/10/2024
Current Date: 25/10/2024
Expected Output: It verifies the difference between the current date and the subscription expiry date, determines the number of days remaining and displays the result as Days left = 06 days.
Output: The action performed and saves the resultant no.of days in {result}output variable as 06.