Can anyone please tell me why this query is not working, attached is a scaled down sample just to get the point across.
The query is trying to filter True anything that is newer than the two current months, and False everything else.
The datetime data is equal for may 1st in the filter, but May is dropped into false in the workflow (assuming we are in June now). I thought it had something to do with time, but the time for both pieces of data being compared are 00:00:00.
Solved! Go to Solution.
@Dismas78 This is because you're comparing a date with a datetime. You'll want to format your DateTime value as a Date before comparing against the data in your flow. You can either use a formula tool before your filter to do this calculation, then reference the newly created variable in your filter, or you can do it all in your filter as you're doing now (example below).
[Test Month]>=
DateTimeFormat(DateTimeAdd(DateTimeFirstOfMonth(),-1,"months"),"%Y-%m-%d")
Hello
This works:
[Test Month]>=
ToDate(DateTimeAdd(DateTimeFirstOfMonth(),-1,"months"))
I presume the "=" part of the comparison doesn't work in the original formulation because it's testing "2019-05-01" against "2019-05-01 00:00" or something like that
Regards
Richard