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
Dual Super User

@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
Dual Super User

@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
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (3,514)