cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DustinSmith
Regular Visitor

If Date is within 6 months of today

I'm attempting to do a date check from some JSON earlier in the flow.  The issue is, it seems always say false, or always say true, no matter what the date input is.

 

The JSON provides this output.

 

DustinSmith_0-1624991990886.png

 

The condition is then set to....

 

formatDateTime(body('Parse_JSON_2')?['InstallationDate'],'MM-dd-yyyy')

 

is greater than or equal to

 

formatDateTime(addDays(utcNow(),-183),'MM-dd-yyyy')

 

 

DustinSmith_1-1624992139394.png

 

What am I doing wrong?

4 REPLIES 4
Mira_Ghaly
Dual Super User II
Dual Super User II

@DustinSmith

Can you share how your condition looks like?

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

DustinSmith_0-1624992850729.png

Of course.  Here it is

Mira_Ghaly
Dual Super User II
Dual Super User II

@DustinSmith

I will suggest if you use Get Past time action to get the date in the last 6 months and compare against it.

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

The current condition is....

 

formatDateTime(body('Parse_JSON_2')?['InstallationDate'],'MM-dd-yyyy')
 
is greater than or equal to
 
getPastTime(6, 'Month''MM-dd-yyyy')
 
The first flow.....
 
DustinSmith_0-1624995755685.png

 

resulted in false 

 

The second flow....

 

DustinSmith_1-1624995860462.png

 

also resulted in false

 
 I'm honestly at a loss.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (1,653)