cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
originalltd
Advocate II
Advocate II

SQL OData - UTC Now

Hi There,

 

I want to filter my SQL rows by "if 'Date' = Today

 

 

Problem is, SQL is yyyy-MM-dd 00:00:00.000

 

The UTC now gives the correct date, but I need it to fix the time to 00:00:00.000 as that is the time in SQL.

 

How do I do this?

 

Thanks,
James

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @originalltd,

 

Could you please share a screenshot of your flow’s configuration?

The date time in SQL table would be converted into UTC format automatically in Microsoft Flow, so it is not necessary to fix the time to 00:00:00.000 format.

The datetime in my SQL table as below:12.JPG

The datetime that Microsoft Flow get as below:  

 

10.JPG

 

If you add a "Filter array" action to filter rows, please take a try with the following workaround:13.JPG

Within “Filter array” action, click “Edit in advanced mode”, type the following formula:

 

@equals(item()?['DueTime'], utcNow('yyyy-MM-ddTHH:mm:ssZ'))

 

If you use Filter OData query, please take a try with the following workaround:

 

13.JPG

 

Best regards,

Kris

Community Support Team _ Kris Dai
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
v-xida-msft
Community Support
Community Support

Hi @originalltd,

 

Could you please share a screenshot of your flow’s configuration?

The date time in SQL table would be converted into UTC format automatically in Microsoft Flow, so it is not necessary to fix the time to 00:00:00.000 format.

The datetime in my SQL table as below:12.JPG

The datetime that Microsoft Flow get as below:  

 

10.JPG

 

If you add a "Filter array" action to filter rows, please take a try with the following workaround:13.JPG

Within “Filter array” action, click “Edit in advanced mode”, type the following formula:

 

@equals(item()?['DueTime'], utcNow('yyyy-MM-ddTHH:mm:ssZ'))

 

If you use Filter OData query, please take a try with the following workaround:

 

13.JPG

 

Best regards,

Kris

Community Support Team _ Kris Dai
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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (44,376)