Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

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

  • Nived_Nambiar Profile Picture
    17,497 Super User 2025 Season 1 on at
    Re: Changing a date format

    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 🙂

     

  • bebo987 Profile Picture
    98 on at
    Re: Changing a date format

    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
  • Verified answer
    Nived_Nambiar Profile Picture
    17,497 Super User 2025 Season 1 on at
    Re: Changing a date format

    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 !

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,635 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow