Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Gp1s1xB10lXiwO38jCv44Q
Power Automate - General Discussion
Answered

Remove time from column

Like (0) ShareShare
ReportReport
Posted on 26 Jul 2023 18:08:26 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

 

 

  • Amirin Profile Picture
    128 on 27 Jul 2023 at 14:18:14
    Re: Remove time from column

    Hi

     

    Hahaha I found the culprit..

    In my create table, I create too many empty tables.

    Now I set a filter in which all empty is not listed. 

    Thank you for your responses Sam..

  • SamLed Profile Picture
    2,332 Moderator on 27 Jul 2023 at 13:39:16
    Re: Remove time from column

    "string '' was not valid"

     

    Empty string again, there is a row with empty date or something you do above select that clear the value...

     

    In the topic you posted, look at the error message, you'll see a date instead of ''. His problem is ISO format and I would suggest him to change his format pattern from dd/MM/yyyy HH:mm to yyyy-MM-ddTHH:mm:ssZ which is the ISO format.

  • Amirin Profile Picture
    128 on 27 Jul 2023 at 13:33:50
    Re: Remove time from column

    And I found this same problem, but they were not able to figure out the problem.

    The responder says here that he must break apart the and rearrange to the correct formatting.

     

     

    https://powerusers.microsoft.com/t5/Building-Flows/The-datetime-string-must-match-ISO-8601-format/td-p/383056

     

     

  • Amirin Profile Picture
    128 on 27 Jul 2023 at 13:31:00
    Re: Remove time from column

    I found the problem for that last error. And my error comes back again to ISO format. 

     

    here is the error now,,

    The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{
    "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,332 Moderator on 27 Jul 2023 at 13:22:24
    Re: Remove time from column

    Hi,

     

    Well I'm french, so date format match my location settings, the expression will match yours.

    But instead of using short date format pattern you can force the format you want :

     

    if(empty(item()?['Paid Date']), '', formatDateTime(item()?['Paid Date'], 'MM/dd/yyyy')) 

     

    My filter do nothing more than selecting row where Title contains 'Test', I just set it up to get the output to match your flow. 

     

    [Edit] my Excel location settings is french but power automate ones is english, see results 😉

  • Amirin Profile Picture
    128 on 27 Jul 2023 at 13:11:03
    Re: Remove time from column

    Could you please show me your filter array?

     

  • Amirin Profile Picture
    128 on 27 Jul 2023 at 13:05:23
    Re: Remove time from column

    Hi.. 

    I hope you are up..

     

    On your sample data, can you change your date ? from 26/7/23 to 7/26/23. That is the only difference we have. I will also try it out on my sample.

  • SamLed Profile Picture
    2,332 Moderator on 26 Jul 2023 at 22:58:32
    Re: Remove time from column

    In function 'formatDateTime', the value provided for date time string '' was not valid. The datetime string must match ISO 8601 format.

     

    If there were a value it would have told string "value" was not valid

  • SamLed Profile Picture
    2,332 Moderator on 26 Jul 2023 at 22:17:15
    Re: Remove time from column

    you're welcome, night 😉

  • Amirin Profile Picture
    128 on 26 Jul 2023 at 22:15:38
    Re: Remove time from column

    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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard