Problem
I am trying to write a simple Flow that gathers some rows from my SQL Server database and sends the data to me via email. However, I am having trouble filtering these records by date. I want the Flow to only retrieve the records from the past day so I am trying to do something such as the following Odata filter query:
ItemCreatedWhen gt addDays(utcNow('yyyy-MM-ddTHH:mm:ssZ'), -1)
When I run this however, I get the following error message:
We cannot apply operator < to types DateTimeZone and DateTime.
The SQL Server datatype of this column is datetime2 in the form of 'yyyy-MM-dd HH:mm:ss'
What I've Tried
I have tried the following:
ItemCreatedWhen gt addDays(utcNow(), -1)
Error: We cannot apply operator < to types DateTimeZone and DateTime.
ItemCreatedWhen gt convertFromUtc(addDays(utcNow(), -1), 'Eastern Standard Time')
Error: The DateTimeOffset text '2019-01-24T10:59:25.7848207' should be in format 'yyyy-mm-ddThh:mm:ss('.'s+)?(zzzzzz)?' and each field value is within valid range. inner exception: The time zone information is missing on the DateTimeOffset value '2019-01-24T10:59:25.7848207'. A DateTimeOffset value must contain the time zone information.