Split date

Hi all,

I am having a string like 04-November-2019

1 Like

we can mention like this
day = Split(str_input,"-")(0)
Month = Split(str_input,"-")(1)
year = Split(str_input,"-")(2)

Cheers @Naveen.Ch

1 Like

@Naveen.Ch
Use this
Split(“YourString”,"-")(0) - Day
Split(“YourString”,"-")(1) - Month
Split(“YourString”,"-")(2) - Year

1 Like

@Naveen.Ch

Open Manage Packages and install Windows Manager Activities package.

Let’s assume the value is stored in a variable, inputString = “04-November-2019”
Search for Split String activity and add it to your workflow.
In the properties window, specify Input as your string variable. i.e., inputString and separator as “-”
The output of this activity will be an array. Specify an array variable in the Result property.
Access the array elements to get the date components and using assign activity assign the values to required variables.
arrayDate(0) => date
arrayDate(1) => month
arrayDate(2) => year

Hope this is helpful!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.