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 / Changing a date format
Power Automate
Unanswered

Changing a date format

(0) ShareShare
ReportReport
Posted on by 98

Hi Community!

 

I have this little issue to fix: 

I'm building a flow that fetches information from an automated email message. In this one we get a date and time in the format that follows:

bebo987_0-1683046138815.png

however we need to plit this into DD/MM/YYY and separately HH:MM:SS. 

how can i get to that result?

 

thank you for your help

Categories:
I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @bebo987 

     

    Try this approach 

     

    Nived_Nambiar_0-1683048728448.png

     

    expression : 

    replace(replace(replace(replace(outputs('date_and_time_to_text')?['body'],'["',''),'"]',''),'.',' '),decodeUriComponent('%27'),'')
     
    this is to cleanup unecessary characters from the text.
     
    Nived_Nambiar_1-1683048788029.png

     

    expression: 

    formatDateTime(trim(split(outputs('Compose'),'@')?[0]),'dd/MM/yyy')
     
    this is to obtain date in dd/MM/yyy format
     
    Nived_Nambiar_2-1683048825515.png

     

    expression: 

    formatDateTime(trim(split(outputs('Compose'),'@')?[1]),'HH:mm:ss')
     
     
    Result
    Nived_Nambiar_3-1683048864238.png

     

     

     

    Hope it helps

     

    Mark it as solution if it resolves your query !

     

  • bebo987 Profile Picture
    98 on at

    HI @Anonymous 

     

    IT WORKS FINE ALTHOUGH THE VALUE EXTRACTED IS INSERTED INTO A SHAREPOINT LIST BUT INSTEAD OF COMING OUT AS DD/MM/YYYY COMES AS MM/DD/YYYY WHICH IS WRONG.

     

    THE FORMULA IN POWER PLATFORM IS: 

    formatDAteTime(trim(split(outputs('Cleanup_date_and_time_to_text'),'@')?[0]),'dd/MM/yyy')
     
    AND I HAVE TRIED TO CHANGE FORMAT IN SHAREPOINT HOWEVER NO SUCCESS. DO YOU HAVE ANY IDEA WHY
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @bebo987 

     

    In sharepoint, I think date is stored in format of MM/dd/yyyy, that is why you got date stored as MM/dd/yyyy under datetime column.

     

    May be use a text column and store the date there, it would preserve the dateformat as dd/MM/yyyy 🙂

     

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard