API Management: Get the difference between two dates
book
Article ID: 145812
calendar_today
Updated On:
Products
CA API Gateway
Issue/Introduction
We would like to know how can we get the difference(no. of days) between two dates. For example, the input dates will come in query parameters to the Gateway:
&date1=12-11-2019&date2=12-30-2019
Environment
All supported versions of the API Gateway
Resolution
A sample policy is attached that makes use of the Execute JavaScript Assertion