# Compare Date

This is a pre-built Action located under the **@Generic Element**. The functionality of this Action in Avo Assure is to compare two given dates that follow the same format. The comparison result stores in a dynamic variable.

## Syntax

**Input Value**: `<date1>;<date2>;<date1 format>`

| Argument                             | Description                                                                                                                                                            |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>\<date1><br>(Required)</p>        | Provide the first date for comparison.                                                                                                                                 |
| <p>\<date2><br>(Required)</p>        | Provide the second date for comparison.                                                                                                                                |
| <p>\<date1 format><br>(Required)</p> | <p>Provide the format of the first date.</p><p> Supported date formats are:</p><ul><li>dd/MM/yyyy</li><li>MM/dd/yyyy</li><li>dd/MMM/yyyy</li><li>MMM/dd/yyyy</li></ul> |

**Output Value**: `<Dynamic Variable>;<Dynamic Variable>(Optional)`&#x20;

| Argument                                                    | Description                                                       |
| ----------------------------------------------------------- | ----------------------------------------------------------------- |
| \<Dynamic Variable>(Required);< Dynamic Variable>(Optional) | Both dynamic variables store the status as **True** or **False**. |

### **Example:** Comparing Dates

In this example, we explain how to compare two given dates to determine if a particular date.

* **Action**: Compare Date
* **Input Value**: 11/12/2025;11/12/2025;dd/MM/yyyy
  * The first argument (**11/12/2025**) specifies the current date.
  * The second argument (**11/12/2025**) specifies the date to compare against.
  * The third argument (**dd/MM/yyyy**) specifies the current format of the input dates.
* **Output Value**: {Status}
  * The execution status (True) is stored in this **{Status}** dynamic variable with the following possible values:
    * **True**: If the comparison is successful.
    * **False**: If the operation fails due to an invalid date or format.

**Logical Explanation**: The **Compare Dates** action fetches the value from the **Input Value** column (**11/12/2025;11/12/2025;dd/MM/yyyy**), compares the two dates, and stores the outcome in the **{Status}** variable as (True).

<figure><img src="/files/sujcc3Qmuw49ghmAlnzd" alt=""><figcaption></figcaption></figure>

#### **Knowledge Bites:**&#x20;

Here are some examples of the different date formats:

<table><thead><tr><th>Date formats </th><th width="370.60009765625">Input Value</th><th>Result </th></tr></thead><tbody><tr><td>dd/MM/yyyy</td><td>08/11/2025;10/11/2025;dd/MM/yyyy</td><td>False</td></tr><tr><td>MM/dd/yyyy</td><td>11/05/2025;11/06/2025;MM/dd/yyyy</td><td>False</td></tr><tr><td>dd/MMM/yyyy</td><td>11/Nov/2025;11/Nov/2025;dd/MMM/yyyy</td><td>True</td></tr><tr><td>MMM/dd/yyyy</td><td>Nov/11/2025;Nov/11/2025;MMM/dd/yyyy</td><td>True</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avoautomation.com/avo-assure/actions/generic/date-operations/compare-date.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
