# Compare dates transform action

## Use case

You are building a workflow that checks if the tickets closed date is greater than the expected close date and would like to know if action is needed based on a true/false value.

## Overview

<figure><img src="https://1835401289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAQQ1EHVcEsGKBPVHmiav%2Fuploads%2FtaXMeEh5bfJv534uSUoU%2FScreenshot%202025-04-04%20at%203.12.19%E2%80%AFPM.png?alt=media&#x26;token=e57bb4d2-49fd-4fb7-998a-8338e032250a" alt=""><figcaption></figcaption></figure>

This transform will take two dates and an operator, it will then perform a comparison based on the operator and return a boolean value.

***

## Parameters

<table><thead><tr><th width="217">Parameter</th><th width="417.3333333333333">Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>First Date</td><td>This should be a valid datetime string representation.</td><td>true</td></tr><tr><td>Second Date</td><td>This should be a valid datetime string representation.</td><td>true</td></tr><tr><td>Comparison Operator</td><td>The operator to use in the comparison.</td><td>true</td></tr><tr><td>Day First</td><td>Whether to interpret the first value in an ambiguous 3-integer date (e.g. 01/05/09) as the day (True) or month (False). If yearfirst is set to True, this distinguishes between YDM and YMD. If set to None, this value is retrieved from the current parserinfo object (which itself defaults to False).</td><td>false</td></tr><tr><td>Fuzzy Parsing</td><td>Whether to allow fuzzy parsing, allowing for string like "Today is January 1, 2047 at 8:21:00AM"</td><td>false</td></tr><tr><td>Ignore Timezone</td><td>If set True, time zones in parsed strings are ignored and a timezone naive datetime object is returned.</td><td>false</td></tr><tr><td>Year First</td><td>Whether to interpret the first value in an ambiguous 3-integer date (e.g. 01/05/09) as the year. If True, the first number is taken to be the year, otherwise the last number is taken to be the year. If set to None, this value is retrieved from the current parserinfo object (which itself defaults to False).</td><td>false</td></tr></tbody></table>

## Usage

<details>

<summary>Example 1: Greater Than</summary>

Inputs:**First Date:** 2025-03-13T04:00:00.000Z**Second Date:** 2025-03-14T04:00:00.000Z**Comparison Operator:** >**Day First:** None**Fuzzy Parsing:** True**Ignore Timezone:** False**Year First:** None

</details>

## Results output

The expected output for this transform is a boolean value based on the comparison of the two dates.

Result Output for Example 1:

```json
False
```


---

# 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.rewst.help/documentation/automations/actions-in-rewst/transform-actions/compare-dates-transform-action.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.
