> For the complete documentation index, see [llms.txt](https://docs.rewst.help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rewst.help/documentation/automations/actions-in-rewst/transform-actions/compare-dates-transform-action.md).

# 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

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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rewst.help/documentation/automations/actions-in-rewst/transform-actions/compare-dates-transform-action.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
