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 Platform Community / Forums / Power Automate / format mm/dd string to...
Power Automate
Unanswered

format mm/dd string to compare to today

(1) ShareShare
ReportReport
Posted on by 2

I have a sharepoint power automate flow that I am trying to compare a string list field (birthday formatted as MM/DD), to today's date (mm/dd).  I have tried EVERYTHING, to no avail.  Some of the examples using "split" and "concat" make sense; however I can't seem to get them to work.

Example, I want to send an email to the team if the employee's birthday, 04/30, matches today's date (04/30/2024).  Thank you!

 

I have the same question (0)
  • trice602 Profile Picture
    16,399 Super User 2026 Season 1 on at

    Hi @cabc301 ,

     

    I have a birthday flow from Excel that does this; albeit this is from a cloud flow but I think the concat expression will help.  Here's the excel table:

     

    trice602_0-1714504017001.png

     

     

    concat(formatDateTime(body('Current_time'),'MM'),'/',formatDateTime(body('Current_time'),'dd'))

     

    Then I am filtering to find today's birthday's.

     

    trice602_1-1714504176072.png

     

     

    Again, I understand you are in Power Automate Desktop but the cloud flow concat expression will help you get today's date into the format you need to compare with you SharePoint List items.

     

     

  • Nguyen-WI Profile Picture
    15 on at

    Run Daily

     

    Initialize birthdayDate = '04-30'

    Initialize currentDay = utcNow( ) // "2024-04-30T00:00:00.0000000Z"

    Initialize substringCurrentDay = substring(variables('currentDay'), 5, 5)

     

    Condition

    - birthdayDate isEqual subStringCurrentDay // These are variables we initialized above

    true -> Send Email

    false -> Don't

     

    ---

    Explanation

    You can get the date by using utcNow( )

    Use 'substring(string, index, length)'

    - string: variables('currentday')

    - index: 5 // We want to start at the month so we use the 5th index to skip '2024-'

    - length:5 // We want the month and day so we use a length of 5 to capture '04-30'

     

    If this is for a team, you're most likely going to be looping over an array of objects.

    [{name: John, birthday: 1111}, {name:jill, birthday:1111}]

     

    Do the same thing but loop over with a condition of:

    - item( )?['birthday'] isEqual substringCurrentDay

    true -> Send Email

    false -> Don't

     

    ---

    If the birthday is formatted with '/' instead of '-', you can use replace( )

    replace(string, whatYouWantToReplace, whatYou'reReplacingWith)
    Example: replace(variable(birthdayDate), '/', '-'

     

    This will allow you to have the same formatted dates

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard