Get Current Date
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. It instructs the Avo Assure Client to fetch the current date and time from the system according to the format specified by the user in the input value and subsequently store the result in the output variable.
Input: <format of date and time>
Supported Input Formats:
MM/dd/yyyy HH:mm:ss
dd/MM/yyyy HH:mm:ss
Output: <Dynamic Variable> ;< Dynamic Variable> (Optional)
Consider a scenario where you are testing an event registration system using which participants can sign up for events with specific start and end dates and timings. You need to ensure that the system validates registrations based on the current date and time and that they can register only for events that are open for registration. A Test Step can be created using the Get Current Date, Time to verify:
The current date and time to a moment before the event starts
Attempt to register for the event
If the registration occurs at the correct date and time, then output should be Registration is successful.
The Get Current Date, Time action is performed, and the current date and time are saves in the {result} output variable with the value as 10/10/2024 01:10:30 and is used for the registration system.