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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,829)