# How can split value from date variable

**URL:** <https://forum.uipath.com/t/how-can-split-value-from-date-variable/183093>\
**Category:** Help\
**Tags:** string, data-manipulation, question, studio, system, activities\
**Created:** [January 8, 2020, 6:48am UTC](https://forum.uipath.com/t/how-can-split-value-from-date-variable/183093 "2020-01-08T06:48:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maitri](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@maitri](https://forum.uipath.com/u/maitri)\
**Post date:** [January 8, 2020, 6:48am UTC](https://forum.uipath.com/t/how-can-split-value-from-date-variable/183093/1 "2020-01-08T06:48:23Z")

</div>

1.I try to split value  
2.CheckDate variable I want only this date “2017-09-27”

"“System.String”

 ![UIPath](https://global.discourse-cdn.com/uipath/original/3X/6/2/626e385d39f9b012343102d119fd3f1b572978df.png)

i wrote formula like this  
Clientinformation.Split(Environment.NewLine.ToCharArray()(1),“[0-9]{4}-”).ToString

---

<div class="post-metadata">

**Author:** ![indra](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/indra/32/34761_2.png) [@indra](https://forum.uipath.com/u/indra)\
**Post date:** [January 8, 2020, 6:52am UTC](https://forum.uipath.com/t/how-can-split-value-from-date-variable/183093/2 "2020-01-08T06:52:04Z")

</div>

@maitri

**Welcome to UiPath community**

> [@maitri](#):
>
> I want only this date “2017-09-27”

If you want to take only this date than you can use regular expression like [This](https://regex101.com/r/5EgSkl/1)

---

<div class="post-metadata">

**Author:** ![Palaniyappan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/palaniyappan/32/524095_2.png) [@Palaniyappan](https://forum.uipath.com/u/Palaniyappan)\
**Post date:** [January 8, 2020, 6:53am UTC](https://forum.uipath.com/t/how-can-split-value-from-date-variable/183093/3 "2020-01-08T06:53:29Z")

</div>

Hi  
Welcome to uipath community  
If we have input in a variable named strinput of type string  
Then to get the date alone  
Use this expression in a assign activity  
**stroutput = System.Text.RegularExpressions.Regex.Match(strinput.ToString,”[0-9]{4}-[0-9]{2}-[0-9]{2}”).ToString**

Cheers @maitri
