How can split value from date variable

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

"“System.String

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

@maitri

Welcome to UiPath community

If you want to take only this date than you can use regular expression like This

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