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 / PA extracts date from ...
Power Automate
Answered

PA extracts date from Email body but reads it in US format instead of European

(0) ShareShare
ReportReport
Posted on by 2

Hello,

 

I have an expression that extracts the date from Email body and the format is either dd.mm.yyy or dd/mm/yyyy.

The problem is that PA reads it as mm.dd.yyyy and even if I use formatDateTime (dd/MMM/yyyy) it uses the day as the month.

 

In this particular case 01.10.2023 is converted to 10/Jan/2023 instead of 01/Oct/2023.

 

 

Categories:
  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @AbduAbdu ,

    Do you want to PA reads the date from Email body as dd.MM.yyyy converted to dd/MM/yyyy?

    If so, I have a test for your reference.

    In my scenario:

    vyetonggumsft_0-1696582568468.png

    vyetonggumsft_1-1696582684979.png

     

    replace(outputs('Compose'),'.','/')

     

     

    Best Regards,

    Sunshine Gu

  • AbduAbdu Profile Picture
    2 on at

    Thank you, I should have provided my expression:

     

    formatDateTime(trim(split(split(triggerOutputs()?['body/body'],'Was ist passiert: Am ')[1],' ')[0]), 'dd/MM/yyyy')

     

    It works now if I just leave it at 'dd/MM/yyyy' and for some reason I get the dd/MMM/yyyy format.

     

    But I have a feeling this is not going to last, so could you modify your expression based on my expression?

     

    EDIT: It doesn't work if the original format of the date is dd/mm/yyyy instead of dots.

    Thanks

  • Verified answer
    v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @AbduAbdu ,

    Please use this expression:

    formatDateTime(concat(split('01.10.2023','.')[1],'/',split('01.10.2023','.')[0],'/',split('01.10.2023','.')[2]),'dd/MMM/yyyy')

    Best Regards,

    Sunshine Gu

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

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 315 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 267

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard