Skip to main content
Community site session details

Community site session details

Session Id : h+786Q8x2qhZSj4mOLWotP
Power Automate - Building Flows
Unanswered

How to add a day to a formatedatetime() and ConvertfromUTC() formula.

Like (0) ShareShare
ReportReport
Posted on 27 Sep 2023 13:19:59 by 106

Hi everyone,

 

I have a flow that's picking up items from a SharePoint list according to the date listed in the date column, in this case it'll be picking up any dates that are a day after the current date. 

This is my current formula: 

addDays(formatdatetime(ConvertfromUTC(utcNow(), 'Eastern Standard Time'), 'yyyy-MM-dd', 1)).
I keep getting the error: The execution of template action 'Filter_array_2' failed: The evaluation of 'query' action 'where' expression '@equals(item()?['field_1'], addDays(formatdatetime(ConvertfromUTC(utcNow(), 'Eastern Standard Time'), 'yyyy-MM-dd', 1)))' failed: 'The template language function 'formatdatetime' expects its third parameter to be of type string. The provided value is of type 'Integer'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.
 
Can someone please lead me into the right direction?
  • Chriddle Profile Picture
    7,932 Super User 2025 Season 2 on 27 Sep 2023 at 15:52:12
    Re: How to add a day to a formatedatetime() and ConvertfromUTC() formula.

    Don't use formatDateTime at all 😉

    The date functions accept a format string.

    convertFromUtc(addDays(utcNow(), 1), 'Eastern Standard Time', 'yyyy-MM-dd')

     

    The brackets are positioned incorrectly in your expression.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete