cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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

@Anonymous

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
Anonymous
Not applicable

DustinSmith_0-1624992850729.png

Of course.  Here it is

Mira_Ghaly
Dual Super User
Dual Super User

@Anonymous

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
Anonymous
Not applicable

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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (6,133)