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

use sql quey result (date) in a condition

Dear all,

 

I execute a sql query with the following outcome:

{
"OutputParameters": {},
"ResultSets": {
"Table1": [
{
"Date": "2019-07-13T00:00:00"
}
]
}
}
 
I would like to use the field [Date] outcome to check whether its equal to today's date (utcnow('yyyy-MM-dd'). However my outcome is false. I cant use the formatdatetime on the sql query because its an item and not a string.
 
Any advice on how to build it?
 
In the end, my goal is to check in the datetable whether the workday of the month is between 5 and 9 and it must be a wednesday, then the daily scheduled flow will return a true. any advice on how do to this differently is welcome as well!
 
best
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Vbv ,

 

Could you share a screenshot of the Flow configuration?

Please consider using Parse JSON to parse outcome, and then use Condition to determine if Date is equal to today's date when traversing Table1.

You could refer to the following blog to understand the usage of Parse JSON:

a-thesis-on-the-parse-json-action-in-microsoft-flow

https://flow.microsoft.com/en-us/blog/five-services-json-http/

The Expression you might use should be:

formatDateTime(item()['Date'],'yyyy-MM-dd')

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi @Vbv ,

 

Could you share a screenshot of the Flow configuration?

Please consider using Parse JSON to parse outcome, and then use Condition to determine if Date is equal to today's date when traversing Table1.

You could refer to the following blog to understand the usage of Parse JSON:

a-thesis-on-the-parse-json-action-in-microsoft-flow

https://flow.microsoft.com/en-us/blog/five-services-json-http/

The Expression you might use should be:

formatDateTime(item()['Date'],'yyyy-MM-dd')

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (6,377)