web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / PowerFx Left/Right not...
Power Automate
Answered

PowerFx Left/Right not working on string

(0) ShareShare
ReportReport
Posted on by 76

Hi there,

 

I have a date in this format, 20220824

 

I am trying to convert to a date like 24-08-2022.  I can't format as a date as its not valid, so I was trying to split it into dd, MM, yyyy so I can then concat with '-' to get 24-08-2022.

 

Split doesn't seem to let me choose the amount of characters to count. 

 

Left and right I get the error

 

Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template function 'left' is not defined or not valid.'. 

 

I am trying 

 

Left('20220823',4)

Left(20220823,4)

 

Is there a better way of doing this please?

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,476 Most Valuable Professional on at

    Hi @NeonThunder,

     

    Below is a list of all the string functions available:

    https://docs.microsoft.com/en-gb/azure/logic-apps/workflow-definition-language-functions-reference#string-functions

     

    In your setup I would use the substring function.

    substring('<text>', <startIndex>, <length>)

     

    Try:

     

     

    substring('20220823',0,4)

     

     

     

  • NeonThunder Profile Picture
    76 on at

    Thanks 🙂 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 315 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 273 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 117 Super User 2026 Season 1

Last 30 days Overall leaderboard