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 / [PAD] convert datetime...
Power Automate
Answered

[PAD] convert datetime to another format

(0) ShareShare
ReportReport
Posted on by 173

Hello guys,

 

i have another problem with my PAD.

 

i read all data from a excel file for populate lot of fields in a webpage.

 

005.JPG

 

my problem is when PAD read the date value from the excel, he add time to the date ...

 

CapturePAD01 (1).jpg

from 07/07/2023 to 07/07/2023 00:00:00

 

How i can keep the format dd/mm/yyyy in PAD ?

 

It's not possible to add a command to convert the format when i populate my field date in my website ?

 

006.JPG

 

When i try to create  another %exceldata% variable with only date column for convert the format, i have a error and i don't understand how to add in my field the date from exceldata2

 

004.JPG

 

 

 

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Use the Convert date time to text action and provide the custom format there as dd/MM/yyyy.

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

     

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • GreguS Profile Picture
    173 on at

    @Agnius 

     

    When i try to use this function, i have all time the same error :  date and time to convert need to be "datetime"

     

    007.JPG

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You are passing in an entire list of dates. You need to convert them one by one. Do a loop on the list and then convert each value separately.

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

     

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • GreguS Profile Picture
    173 on at

    I don’t really understand how to do.

     

    i need to use a second variable excel for isolate this column with date  ?

     
    maybe you have a link for undestand 

     

     

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you want everything in your list converted, you need to loop through the list and convert each value separately like this:

    Agnius_0-1691380577769.png

    Here's a piece of code that you can copy and paste directly to PAD to have this loop created for you:

    LOOP LoopIndex FROM 0 TO ExcelData2.Count - 1 STEP 1
     Text.ConvertDateTimeToText.FromCustomDateTime DateTime: ExcelData2[LoopIndex] CustomFormat: $'''dd/MM/yyyy''' Result=> FormattedDateTime
     SET ExcelData2[LoopIndex] TO FormattedDateTime
    END

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • GreguS Profile Picture
    173 on at

    Hi,

     

    i have a error : %Exceldata2% doesn't have a count property

     

    thank for your help

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Seems like you have a data table there and not really a list. My mistake. Use .RowsCount instead and provide a column index in the Convert actions:

    Agnius_0-1691673295801.png

    Here's a snippet:

    LOOP LoopIndex FROM 0 TO ExcelData2.RowsCount - 1 STEP 1
     Text.ConvertDateTimeToText.FromCustomDateTime DateTime: ExcelData2[LoopIndex][0] CustomFormat: $'''dd/MM/yyyy''' Result=> FormattedDateTime
     SET ExcelData2[LoopIndex][0] TO FormattedDateTime
    END

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • GreguS Profile Picture
    173 on at

    you are awesome

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 132

Last 30 days Overall leaderboard