# Normalize date granularity

The Normalize Date granularity step allows to extract date information (eg. *day*, *week*, *year* etc.) in a column intended for aggregation.

### Step parameters

* `Date column` **(string\*)**: the column on which the date granularity must be applied
* `Date granularity to apply` **column(string)\***: Among ( year, quarter number, month, ISO week (monday to monday), week (sunday to sunday) you can choose one or more date granularity to apply.
* `New column` **column(string)\***: the ending date

{% hint style="info" %}
The following granularities are supported:

* `year`: calendar date corresponding to the first day (1st of January) of the year
* `quarter`: calendar date corresponding to the first day of the quarter
* `month`: calendar date corresponding to the first day of the month
* `week`: calendar date corresponding to the first day of the week (sunday)
* `isoWeek`: calendar date corresponding to the first day of the week (monday)
* `day`: calendar date corresponding to the first hour of the day
  {% endhint %}

### Example

**Input**

<figure><img src="/files/QaXfjAs4qvye86P8GJir" alt=""><figcaption><p>Date - Normalize date granularity input</p></figcaption></figure>

**Configuration**

```json
{
  "column": "date",
  "granularity": "year",
  "new_column": "aggregated_date_column",
}

```

**Output**

<figure><img src="/files/vnCgbEA7GTlDKfBL4ZNE" alt=""><figcaption><p>Date - Normalize date granularity output</p></figcaption></figure>


---

# 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-v3.toucantoco.com/data-management-in-datahub/datasets-in-toucan/preparing-data/overview-of-youprep-tm/date/normalize-date-granularity.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.
