Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Having trouble with getting today's date for a condition

(0) ShareShare
ReportReport
Posted on by 242

Hello

My Flow depends on a column (Future Approval Date) equals Today. I live in Australia so date format is dd/MM/yyyy

 

What I have so far is if 'Future Approval Date' is equal to formatDateTime(utcNow(),'ddMMyyyy') (which needs to be Today) then proceed.

 

I've tried just utcNow() and put in a convert time zone as well and that doesn't work either.

Not sure if convert time zone is necessary but I've been battling with this for a long time. Flow just goes down the No side and doesn't work.

 

1.png

  • spinneroo Profile Picture
    242 on at
    Re: Having trouble with getting today's date for a condition

    Thank you, thank you, thank you. 

  • Verified answer
    MattWeston365 Profile Picture
    1,701 on at
    Re: Having trouble with getting today's date for a condition

    Hi @spinneroo did you try the suggestion made by @v-bacao-msft?

     

    Ideally when you're comparing two dates in the way that you want you would just convert both sides to a string, strip off the time and concentrate on the dates in the format yyyy-MM-dd.

     

    So you could use formatDateTime(utcNow(),'yyyy-MM-dd') to get todays date, and formatDateTime(<mydynamiccontent>,'yyyy-MM-dd') to format the comparison. Take note of the date format as that is the most common and robust way of formatting as it will work regardless of timezone or date format. I commonly use this when I need to compare dates in UK format to those in a US format.

     

    formatDateTime.PNG

  • Gristy Profile Picture
    2,429 on at
    Re: Having trouble with getting today's date for a condition

    Hey,

     

    That is not the correct format for a update item action.

     

    I think it is the one ending [u] that has to be used. I tried to find a flow to confirm but cannot find one i have built before using this.

  • spinneroo Profile Picture
    242 on at
    Re: Having trouble with getting today's date for a condition

    Hi there
    I have done as you suggested and then after convert time zone I have Update Item, and put converted time into TodayDate field. I also put it in the Title field to check the date.

    The flow throws an error and says:

     

    "status": 400,
    "message": "String was not recognized as a valid DateTime.

     

    I checked the title column and the date is correct and in the correct format (dd/MM/yyyy). But it is not happy in the TodayDate field - I can't work out why.

     

    I have checked the regional settings on the library and they are correct and I even checked the TodayDate column and made sure it is friendly (I even tried Standard but that made no difference either).

    Do you know why this is happening now?

    Thanks again.

  • Gristy Profile Picture
    2,429 on at
    Re: Having trouble with getting today's date for a condition

    Hey,

     

    So in your condition - you have selected Dynamic Data i.e. TodaysDate from what looks like the Trigger.

     

    Delete TodaysDate with the SharePoint S icon.

     

    Click into that area and the pop-up with Dynamic Data will come up.

     

    You will want to insert the converted date from the convert time zone

     

    Take a look here:

     

    Annotation 2019-09-19 101824.png

  • v-bacao-msft Profile Picture
    on at
    Re: Having trouble with getting today's date for a condition

     

    Hi @spinneroo ,

     

    For example, you can first enter the two Dates you want to compare in Compose.

    The above represents today's date, the following represents Created Date, and uses the formatDateTime() function to modify them to the format of yyyy-MM-dd.

    Then in the Flow run history to see the value of the two Dates in the compose.

    Image reference:

    193.PNG

     

    Best Regards,

  • spinneroo Profile Picture
    242 on at
    Re: Having trouble with getting today's date for a condition

    I'm sorry but you have completely lost me.

  • Gristy Profile Picture
    2,429 on at
    Re: Having trouble with getting today's date for a condition

    Hey, if you click in the condition, you should see in the dynamic data the output from the action instead of the sharepoint icon it will have the same icon.

  • spinneroo Profile Picture
    242 on at
    Re: Having trouble with getting today's date for a condition

    Ok, thank you 🙂
    Can you tell me how I use the converted time? I didn't see anything on that when I was looking at tutorials.

    Should I put TodayDate in the base time field?

  • Gristy Profile Picture
    2,429 on at
    Re: Having trouble with getting today's date for a condition

    Hi,

     

    Sorry i meant after the flow has run, you can inspect it and see what values actually are.

     

    It looks like you are not using the converted time at all though, you are using a SharePoint Column rather than the output of the conversion action

     

     

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

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!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1