Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Logic App, SQL Get rows with DateTime comparison

In an Azure Logic App, I'm attempting to use the SQL Server "Get rows" action, using an On-premises Data Gateway with a simple ODATA Filter Query:

mdate gt 2018-05-07T07:15:12Z 

mdate, in this case, is a DateTime field.

This is returning with HttpCode 502, "Web server received an invalid response while acting as a gateway or proxy server". Is there a fix, workaround, or at least a reason I'm seeing this issue?

like image 724
Mark A Johnson Avatar asked Apr 08 '26 14:04

Mark A Johnson


1 Answers

Logic Apps ODATA Filter works well with datetimeoffset types but not with datetime types.

Either you change the data type to datetimeoffset or have a complex ODATA filter to compare each part of the datetime e.g.

year(mdate) gt year(2018-05-07T07:15:12Z) and 
month(mdate) gt month(2018-05-07T07:15:12Z) and 
day(mdate) gt day(2018-05-07T07:15:12Z) and so on...

You can find a detailed discussion on this here.

HTH

like image 196
Paco de la Cruz Avatar answered Apr 11 '26 03:04

Paco de la Cruz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!