Get Current Date, Time

This is a pre-built Action located under the @Generic Element. The functionality of this Action in Avo Assure is to fetch the current date and time from the system. The extracted value is stored in the given dynamic variable for further use during test execution.

Syntax

Input Value: <format of date and time>

Argument
Description

<format of data and time> (Required)

Provide the desired date and time format.

Supported date and time formats are:

  • Date Formats:

    • dd/MM/yyyy

    • MM/dd/yyyy

    • dd/MMM/yyyy

    • MMM/dd/yyyy

  • Time Format:

    • HH:mm:ss

Output Value: <Dynamic Variable>;<Dynamic Variable>(Optional)

Argument
Description

<Dynamic Variable> (Required)

This dynamic variable stores the current date and time in the specified format.

<Dynamic Variable> (Optional)

This dynamic variable stores the status as True or False.

Example: Fetching the Current System Date and Time in a Specified Format

  • Action: Get Current Date, Time

  • Input Value: dd/MM/yyyy HH:mm:ss

    • The input value (dd/MM/yyyy HH:mm:ss) specifies the desired date and time format.

  • Output Value: {CurrentDateTime}

    • The formatted date and time (15/04/2025 13:45:30) are stored in this {CurrentDateTime} dynamic variable.

    • If a second output variable is provided, then action returns the status as True or False:

      • True: If the date and time are successfully retrieved.

      • False: If the retrieval fails due to an invalid format or system error.

  • Logical Explanation: The Get Current Date, Time action takes the format value from the Input Value column (dd/MM/yyyy HH:mm:ss) and retrieves the current system date and time accordingly. The result (15/04/2025 13:45:30) is stored in the {CurrentDateTime} variable.

Knowledge Bites:

Here are some examples of different date and time formats:

Date formats
Input Value
Result

MM/dd/yyyy HH:mm:ss

MM/dd/yyyy HH:mm:ss

11/12/2025 02:03:41

dd/MMM/yyyy HH:mm:ss

dd/MMM/yyyy HH:mm:ss

12/Nov/2025 02:04:52

MMM/dd/yyyy HH:mm:ss

MMM/dd/yyyy HH:mm:ss

Nov/12/2025 02:06:16

dd/MM/yyyy HH:mm:ss

dd/MM/yyyy HH:mm:ss

12/11/2025 02:07:34

Last updated

Was this helpful?