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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

checking date

(0) ShareShare
ReportReport
Posted on by 164

Hi, how can i write my power automate flow to check for certain characters in the data and remove it. So for example, i got afew data here in different cells, but belonging under the same column.

 

1st cell: 22nd May 2022

2nd cell: 3rd May 2022

3rd cell: 4th May 2022

4th cell: 1st May 2022

 

How can i remove away the 'nd', 'rd', and 'th'?

I have the same question (0)
  • Verified answer
    VJR Profile Picture
    7,635 on at

    If you are able to get a regular expression then great else below is a simple way using the in-built PAD actions.

     

    Only st, nd, rd, st, th will be present for dates from 1st to 31st. Replace these with blank string.
    For st, take care of dates like 1st August where st is used twice but st comes only for 1st, 21st, 31st, so replace 1st with 1.

     

    Write a common Subflow that will perform the above actions so you can call it again and again like a function.

     

     

    VJR_0-1652262935161.png

     

     

    Post back if you are facing any issues.

     

  • Alphadrag Profile Picture
    164 on at

    The format for the date is dd MMM yyyy

  • ApoxiomeN Profile Picture
    32 on at

    ApoxiomeN_1-1652266094222.png

     

     

  • Alphadrag Profile Picture
    164 on at

    Hi, can explain this regular expression please thank you

  • ApoxiomeN Profile Picture
    32 on at

    You pass for example "22nd May 2022" and in this case it selects "nd".

    It always selects the letters behind the day, before the space and the capital letter of the month.

    You just replace it with nothing (%""%), effectively deleting those letters and you end up with the format you're looking for.

     

    (?<=[0-9])([a-z].*)(?=\s[A-Z])

    so you can paste it

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 386

#2
Valantis Profile Picture

Valantis 342

#3
Haque Profile Picture

Haque 336

Last 30 days Overall leaderboard