Skip to main content

Notifications

Power Automate - Building Flows
Answered

Time Expression for Current Date

Posted on by

Hello all,

I'm sure this is a question that has been asked a number of times, but I have had no luck in finding it if that's the case. I am horrible at trying to create expressions that actually make sense and do what I need them to. I have a flow where after a set of circumstances, the flow is supposed to delay until the 'Start Date' column value for the item. Originally, I used dynamic content to just plug the Start Date column into the delay until step, but my flow keeps failing and acting like the Start Date column isn't valid.

So, I thought I'd try a different direction to see if it would work better by writing an expression that essentially says 'delay until the Start Date column is equal to today's date'. I need help writing out that expression though as I am still not very well-versed in writing them.

Thank you in advance!

  • Becca_Hayes Profile Picture
    Becca_Hayes on at
    Re: Time Expression for Current Date

    I think I've got it -for now anyway 😅- thanks for the help!! I will be sure to give it a try 😊

  • Verified answer
    Sundeep_Malik Profile Picture
    Sundeep_Malik 6,488 on at
    Re: Time Expression for Current Date

    @Becca_Hayes 

    Currently I am on mobile so when I will try it on my PC, I will give you the expression. For the current moment, 

    I will suggest to use a scheduled trigger, that would run everyday once. 

    You can make a new flow in the starting search for schedule. Then set the schedule to run everyday. 

     

    After this use get items, and in the filter use

    StartDate eq utcNow('MM-dd-yyyy')

     

    Here the formats of both start date and and utc now should match like whatever is stored in your SP list.

    Then you can update to occuring. 

     

    By this your flow will run everyday, get items will filter out records where start date matches current date and then update the status to occuring.

     

    If you got all of this try yourself, if you didn't just reply and I will post screenshots. 🙂

  • Becca_Hayes Profile Picture
    Becca_Hayes on at
    Re: Time Expression for Current Date

    Oh, I didn't know about that! That could be part of the issue. The flow is running on a SharePoint list that is being used as a way of tracking upcoming events. Some of them are planned months in advance, so the 30 day run-time restriction could be part of the problem. Is there a way to bypass this or to set up a way to restart the flow if it has been in the "delay until" for more than 30 days?

     

    I would still like to know how to write that expression though, if that is possible. I included a screenshot of the error I get when the flow tries to run. What the flow is trying to accomplish is updating the status of an event item when it hits certain criteria. So, when the item's Start Date is the current date, it is supposed to update the status to "Occurring" and then stay that way until the item's End Date where it will then update the status to "Completed" and then finish out the flow from there.

  • Sundeep_Malik Profile Picture
    Sundeep_Malik 6,488 on at
    Re: Time Expression for Current Date

    Hey @Becca_Hayes 

     

    Just wanted to know what you are trying to do in the flow.

    There is a limitation for Power automate that it can run only for 30 days. So let's say your start date is in July, and the flow starts today, it will stop on 22nd June. 

     

    So I want to know more about your flow, what is the trigger and what exactly you are trying to do.

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard