# How to convert date in string data type to date data type?

**URL:** <https://community.automationedge.com/t/how-to-convert-date-in-string-data-type-to-date-data-type/17827>\
**Category:** Process Studio\
**Tags:** rpa\
**Created:** [April 17, 2026, 11:55pm UTC](https://community.automationedge.com/t/how-to-convert-date-in-string-data-type-to-date-data-type/17827 "2026-04-17T23:55:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siddharth\_31122002](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@Siddharth\_31122002](https://community.automationedge.com/u/Siddharth_31122002)\
**Post date:** [April 17, 2026, 11:55pm UTC](https://community.automationedge.com/t/how-to-convert-date-in-string-data-type-to-date-data-type/17827/1 "2026-04-17T23:55:04Z")

</div>

The date is available in string format; I want to convert it into the date format so that I can add 30 days to it. I have used “Rename Fields” and converted it to date type but it is not being converted appropriately. Please see the enrolment date in the screenshot. It is not in appropriate format.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/automationedge/original/2X/1/1f6f92f5dcb50b069a26b6ffd85ceded74caa496.png)

---

<div class="post-metadata">

**Author:** ![AETrainings](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@AETrainings](https://community.automationedge.com/u/AETrainings)\
**Post date:** [October 6, 2026, 10:26am UTC](https://community.automationedge.com/t/how-to-convert-date-in-string-data-type-to-date-data-type/17827/2 "2026-10-06T10:26:08Z")

</div>

> [@Siddharth\_31122002](#):
>
> The date is available in string format; I want to convert it into the date format so that I can add 30 days to it. I have used “Rename Fields” and converted it to date type but it is not being converted appropriately. Please see the enrolment date in the screenshot. It is not in appropriate format.

The date usually comes out wrong because the **Format** column doesn’t match the incoming string. When you set the type to `Date`, the step needs the exact input format to parse the text. If it’s blank or doesn’t match, you’ll get wrong dates or an error.

**Step 1: Convert the string to a date (`Rename Fields`)**

1. Open your `Rename Fields` step.
2. For the enrolment date field, set:
  - **Type:** `Date`
  - **Format:** the exact mask that matches your string

Common format masks:

| Input string | Format mask |
| --- | --- |
| `2026-10-06` | `yyyy-MM-dd` |
| `06/10/2026` | `dd/MM/yyyy` |
| `10/06/2026` | `MM/dd/yyyy` |
| `06-Oct-2026` | `dd-MMM-yyyy` |
| `06-10-2026 14:30:00` | `dd-MM-yyyy HH:mm:ss` |

Masks are case-sensitive: `MM` is month, `mm` is minutes, `yyyy` is the 4-digit year, and `dd` is the day.
