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 / Remove time from column
Power Automate
Answered

Remove time from column

(0) ShareShare
ReportReport
Posted on by 128

Hi Guys,,

I have a file that needed to be copied into other file.

But the raw file have a column that have both date and time. 

I only want to get the date and omit the time.

data.jpg

 

And this is my flow

Amirin_0-1690394890888.png

 

 

Categories:
I have the same question (0)
  • SamLed Profile Picture
    2,338 Moderator on at

    Hi,

     

    Use formatDateTime([Your date field data], 'd') as dynamic content expression. 'd' is the short date pattern format.

     

    Regards.

  • Amirin Profile Picture
    128 on at

    Hi.. I am new

    Can you please show where I will put it? 

     

  • Verified answer
    SamLed Profile Picture
    2,338 Moderator on at

    Here a small test flow I made for you :

     

    SamLed_0-1690406608622.png

     

    Where the map value is : formatDateTime(item()?['Paid Date'], 'd')

     

    SamLed_1-1690406814520.png

    Use the same expression for every date you want to format. Also pay attention to the DateTime format in the "List rows present in a table" action. it must be "Iso 8601" when you get data from Excel.

     

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

  • Amirin Profile Picture
    128 on at

    Hi..

    Sadly I got this Error

    Amirin_2-1690407929021.png

     

     

     

    Amirin_1-1690407786465.png

     

  • SamLed Profile Picture
    2,338 Moderator on at

    It works on my side...

     

    SamLed_0-1690408550846.pngSamLed_1-1690408592927.png

    formatDateTime(item()?['Paid Date'], 'd') and formatDateTime(item()?['Add Date'], 'd')

    SamLed_2-1690408681995.png

     

    Can you copy/paste me the whole error message, it is truncated in your screenshot.

     

     

  • Amirin Profile Picture
    128 on at

    Here you go

     

    The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{
    "Paid Date": "@formatDateTime(item()?['Paid Date'], 'd')",
    "Add date": "@formatDateTime(item()?['Add date'], 'd')"
    }' failed: 'In function 'formatDateTime', the value provided for date time string '' was not valid. The datetime string must match ISO 8601 format.'.

  • SamLed Profile Picture
    2,338 Moderator on at

    Have you selected the correct DateTime format (ie ISO 8601) in the "List rows present in a table" action ?

  • SamLed Profile Picture
    2,338 Moderator on at

    Well it seeams you have null value in one or more rows in one or more date columns...

  • SamLed Profile Picture
    2,338 Moderator on at

    Replace formatDateTime(item()?['Paid Date'], 'd') by if(empty(item()?['Paid Date']), '', formatDateTime(item()?['Paid Date'], 'd')) 

  • Amirin Profile Picture
    128 on at

    I am looking at my sample data.. And I don't have any null value.

     

    Thank you for answering me,, I am now logging off and hopefully tomorrow will find a solution.

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard