web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : O8VL8i/Exc+DtfdmZMvaZ0
Power Automate - Building Flows
Answered

Date Compare Logic Stopped Working

Like (0) ShareShare
ReportReport
Posted on 2 Nov 2023 01:26:14 by 162

Hi Automate Community.

 

Can anyone possibly offer a suggestion as to why the following Date compare logic might have stopped working please?

 

A condition statement does a simple compare of a formatted date output from a compose to simply check whether it is within a number of days. 

 

Here is the compose which produces an ISO 8601 formatted date value from an Excel spreadsheet date integer for the 1st check: 

addDays('1899-12-30',int(items('Apply_to_each')?['Column10']),'yyyy-MM-dd')
 
Here is the condition compare:
PowerAutomateIssue1.png
 
 
This was working fine for a few months already but suddenly cannot seem to handle dates after Oct 30 2023.
 
I have the same question (0)
  • Verified answer
    Nicer_Atl Profile Picture
    162 on 02 Nov 2023 at 14:28:55
    Re: Date Compare Logic Stopped Working

    Thanks for the responses. Think I found the problem.  I actually realized there was inconsistency in the compare statement where I was using MM-dd-yyyy instead of true utc of yyyy-MM-dd.   While the screenshot showed the correct thing, having placed some debug statements further in the flow masked the fact that it was actually resolved before I posted.  The takeaway here is to always use utc for date manipulations otherwise it may work in some cases but not always.

  • wskinnermctc Profile Picture
    6,519 Moderator on 02 Nov 2023 at 13:42:36
    Re: Date Compare Logic Stopped Working

    What are both of the comparisons? 

     

    You are showing:

    1. Output is greater than or equal to formatDateTime(utcNow(),'yyyy-MM-dd')
    2. Output is less than or equal to ???????

    What is the second comparison?

     

    -fyi -  you could use utcNow('yyyy-MM-dd') instead of formatDateTime(utcNow(),'yyyy-MM-dd') - 

  • grantjenkins Profile Picture
    11,059 Moderator on 02 Nov 2023 at 08:10:49
    Re: Date Compare Logic Stopped Working

    Are you getting an error, or is it just not evaluating to what you'd expect? I'd suggest looking at each of the outputs to see exactly what's being returned from your Excel table.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 798 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 469 Moderator

#3
Power Apps 1919 Profile Picture

Power Apps 1919 333

Last 30 days Overall leaderboard