cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Split string by no value

Hello, 

 

I want to split a year value and just capture the last two digits.

 

For example:

Input: 2019

Desired Outuput: 19

 

I was trying with:

Split(outputs('Compose_year'),'')

But the result is '2019', not the expected '2','0','1','9'... there's no character separation. 

 

How could i split this? 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @LuisGuzman98 

 

Use the expression function  substring('2019',2,2)

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

2 REPLIES 2
Super User III
Super User III

Hi @LuisGuzman98 

 

Use the expression function  substring('2019',2,2)

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

Community Support
Community Support

Hi @LuisGuzman98,

 

Do you want to process the year value, does it have the month and day value? If it does, you can use the formatDateTime() function as below:Annotation 2019-10-18 143450.png

 

If it is only '2019', you can refer to @abm 's method.

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (24,470)