cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LuisGuzman98
Level: Powered On

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
Highlighted
Super User
Super User

Re: Split string by no value

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!



View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: Split string by no value

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!



View solution in original post

Community Support Team
Community Support Team

Re: Split string by no value

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 353 members 6,975 guests
Please welcome our newest community members: