Ask a Question

API Monitor Current Date Variable

0 Kudos

API Monitor Current Date Variable

We need a way to populate a variable with the current date or time.


In one of our API calls, the API is expecting a start date and end date. Those dates need to be somewhere within the last 6 months.


Aside from calling some 3rd party API that would return the current date (which would make our test dependent on another API being available and increase our credit usage), I'm not finding a way to populate a variable with the current date.


In SoapUI tests we are doing the following

startDate=${=def now = new Date();now.month=now.month-1;now++;now.format("yyyy-MM-dd")}

endDate=${=def now = new Date();now.format("yyyy-MM-dd")}

Welcome to the AlertSite Feature Requests board!

Here you can review submitted feature requests and vote up the ones you like! If you can't find the feature you want - go ahead and suggest your own idea. Ideas with the highest rating can be implemented in the product.

Check out the Create a Feature Request guide for more information.
New Here?
Welcome to the Community
Sign Up Here