# Date Format Uipath Studio

**URL:** <https://forum.uipath.com/t/date-format-uipath-studio/363649>\
**Category:** Help\
**Tags:** activities, system\
**Created:** [November 22, 2021, 4:09pm UTC](https://forum.uipath.com/t/date-format-uipath-studio/363649 "2021-11-22T16:09:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![El\_Mehdi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/el_mehdi/32/262927_2.png) [@El\_Mehdi](https://forum.uipath.com/u/El_Mehdi)\
**Post date:** [November 22, 2021, 4:09pm UTC](https://forum.uipath.com/t/date-format-uipath-studio/363649/1 "2021-11-22T16:09:28Z")

</div>

Hello,  
I need your help please.  
I need to get the date format like 22-11-2021 on UiPath Studio.  
Could you please help me?

---

<div class="post-metadata">

**Author:** ![lakshman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshman/32/523490_2.png) [@lakshman](https://forum.uipath.com/u/lakshman)\
**Post date:** [November 22, 2021, 4:18pm UTC](https://forum.uipath.com/t/date-format-uipath-studio/363649/2 "2021-11-22T16:18:52Z")

</div>

@El_Mehdi

Welcome to our UiPath community.

Try below expression.

```
           Now.ToString("dd-MM-yyyy")

```

---

<div class="post-metadata">

**Author:** ![garett](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/garett/32/176684_2.png) [@garett](https://forum.uipath.com/u/garett)\
**Post date:** [November 22, 2021, 4:24pm UTC](https://forum.uipath.com/t/date-format-uipath-studio/363649/3 "2021-11-22T16:24:44Z")

</div>

Hello @El_Mehdi,

The date format you’ve provided appears to be as follows: “dd-MM-yyyy”.

If you wanted to replicate that for the current date, you could use an **Assign** activity:

str\_CurrentDate = Now.ToString(“dd-MM-yyyy”)

* * *

Now, let’s say you have another date, maybe not the “current” date and in a different format such as “MM/dd/yyyy”.

The example date we’ll use is 11/21/2021 and it’s stored as a variable.

> str\_Date = “11/21/2021”

I can format that date into my preferred format as follows:

> str\_ReformattedDate = Date.ParseExact(str\_Date, “dd-MM-yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString`

We call the method of a Date class, ParseExact (Date.ParseExact) and pass in the date string, specify the format we want and pass in an InvariantCulture provider and then convert it to a string.

---

<div class="post-metadata">

**Author:** ![Srini84](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/srini84/32/464032_2.png) [@Srini84](https://forum.uipath.com/u/Srini84)\
**Post date:** [November 22, 2021, 4:28pm UTC](https://forum.uipath.com/t/date-format-uipath-studio/363649/4 "2021-11-22T16:28:16Z")

</div>

@El_Mehdi

Welcome to forums

Check below for your reference

[Reference](https://youtu.be/h9pAsRS6hmc)

Hope this may help you

Thanks
