---
title: Change Date Formats in Automation
description: "### Overview This feature allows users to transform dates imported from a CSV file into the date formats configured in a Smart Document. In this example, we will configure two date variables: - **Date of Birth** - **Start Date** The…"
url: "https://legale.io/docs/change-date-formats-in-automation/"
updated: "2026-07-31"
category: Date Functionality
---

# Change Date Formats in Automation

### Overview

This feature allows users to transform dates imported from a CSV file into the date formats configured in a Smart Document.

In this example, we will configure two date variables:

- **Date of Birth**
- **Start Date**

The dates stored in the CSV may use different formats. During the CSV automation configuration, the platform must be informed of the original format of each date. The Smart Document will then display the dates using the formats previously configured for each variable.

 

### Create or Edit a Smart Document

Go to the **Smart Documents** section and create a new Smart Document or open an existing one.

The Smart Document must contain the variables that will receive the information imported from the CSV file.

For this example, add the following variables:

- **Date of Birth**
- **Start Date**

 

         ![](https://legale.io/wp-content/uploads/2026/07/1-1024x510.png)

### Configure the Date Variables

Select the **Date of Birth** variable and configure it as a **Date** field.

Choose the format in which the date should be displayed in the generated document.

Example:

**31 December 1990**

Next, select the **Start Date** variable and configure it as a **Date** field.

For this variable, select the following display format:

**31/12/1990**

These settings determine how each date will appear in the final generated document, regardless of how the original value is written in the CSV file.

         ![](https://legale.io/wp-content/uploads/2026/07/2-1024x510.png)     ![](https://legale.io/wp-content/uploads/2026/07/3-1024x510.png)

### Save the Smart Document

After configuring both variables, click **Save** to save the Smart Document.

Make sure all variables and date formats have been configured correctly before continuing with the CSV automation.

### Upload the CSV File

Go to the **CSV Automation** section.

Upload the CSV file containing the information that will be used to generate the documents.

The CSV must include columns corresponding to the variables configured in the Smart Document. In this example, it must contain columns for:

- **Date of Birth**
- **Start Date**

Enter a name for the uploaded CSV file and complete the upload process.

 

         ![](https://legale.io/wp-content/uploads/2026/07/4-1024x508.png)     ![](https://legale.io/wp-content/uploads/2026/07/5-1024x508.png)     ![](https://legale.io/wp-content/uploads/2026/07/6-1024x65.png)

### Open the CSV Automation Configuration

Once the CSV file has been uploaded, select the corresponding automation and click **Configuration**.

The platform will request that a Smart Document be associated with the automation.

Select the Smart Document configured in the previous steps.

 

     ![](https://legale.io/wp-content/uploads/2026/07/7-1024x508.png)

### Automatically Assign the CSV Headers

After selecting the Smart Document, use the **Automatically Assign Headers** option.

The platform will attempt to associate each CSV column with its corresponding Smart Document variable.

Verify that the following headers have been correctly assigned:

- The **Date of Birth** CSV column must be associated with the **Date of Birth** variable.
- The **Start Date** CSV column must be associated with the **Start Date** variable.

If a header is not assigned correctly, select the corresponding variable manually.

         ![](https://legale.io/wp-content/uploads/2026/07/8-1024x508.png)

### Specify the Original CSV Date Formats

Below each date variable, an additional field labeled **No Format** or **Unformatted** will be displayed.

This field must be used to indicate the format in which the original date is written in the CSV file.

### Date of Birth

In this example, the Date of Birth value is stored in the CSV as:

**1990-12-31**

Therefore, select the input format that corresponds to:

**YYYY-MM-DD**

### Start Date

In this example, the Start Date value is stored in the CSV as:

**31/12/1990**

Therefore, select the input format that corresponds to:

**DD/MM/YYYY**

This configuration allows the platform to correctly interpret each CSV value before converting it into the format configured in the Smart Document.

 

         ![](https://legale.io/wp-content/uploads/2026/07/9-1024x505.png)     ![](https://legale.io/wp-content/uploads/2026/07/10-1024x507.png)

### Complete the Automation Configuration

After configuring the date formats, complete the remaining CSV automation steps.

Review the following information before continuing:

- The correct Smart Document is associated with the automation.
- All CSV headers are assigned to the correct variables.
- The original input format is configured for each date variable.
- The remaining workflow settings are complete.

Save the automation configuration.

     ![](https://legale.io/wp-content/uploads/2026/07/11-1024x528.png)

### Start the Workflow

Once the configuration has been completed, start the workflow to process the CSV file and generate the documents.

The platform will read the original dates from the CSV, interpret them using the selected input formats, and display them using the formats configured in the Smart Document.

 

         ![](https://legale.io/wp-content/uploads/2026/07/12-1024x507.png)     ![](https://legale.io/wp-content/uploads/2026/07/13-1024x510.png)

### Verify the Generated Documents

After the workflow has finished, open one of the generated documents.

Verify that the dates are displayed in the expected formats.

### Expected result

| Variable | Original CSV value | Format displayed in the document |
| --- | --- | --- |
| Date of Birth | 1990-07-31 | 31 of July 2026 |
| Start Date | 26/07/1990 | 26/07/1990 |

The generated document should display each date according to the format configured in its corresponding Smart Document variable.

         ![](https://legale.io/wp-content/uploads/2026/07/14-1024x509.png)

### Important Considerations

The input format selected in the CSV automation must exactly match the format of the values stored in the CSV file.

For example:

- A value such as **1990-12-31** must use the **YYYY-MM-DD** input format.
- A value such as **31/12/1990** must use the **DD/MM/YYYY** input format.

If the selected input format does not match the CSV value, the platform may not recognize the date correctly or may generate an incorrect result.

All values within the same CSV column should use a consistent date format.
