# Ecto with dates comparison?

**URL:** <https://forum.elixirforum.com/t/ecto-with-dates-comparison/33762>\
**Category:** Questions\
**Tags:** ecto, phoenix, datetime\
**Created:** [August 15, 2020, 8:47pm UTC](https://forum.elixirforum.com/t/ecto-with-dates-comparison/33762 "2020-08-15T20:47:09Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![9Dave9](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/9dave9/32/18748_2.png) [@9Dave9](https://forum.elixirforum.com/u/9Dave9)\
**Post date:** [August 16, 2020, 1:05am UTC](https://forum.elixirforum.com/t/ecto-with-dates-comparison/33762/3 "2020-08-16T01:05:34Z")

</div>

Hi,

Yeh so I just realised they’re seen as maps and the keys are what are being compared apparently.|

I swapped the above out with this:

```elixir
 query = from s in ScheduledPush, where: s.status not in ["completed", "cancelled"] and s.utc_schedule_time > from_now(1, "microsecond") 

```

[From the docs here](https://hexdocs.pm/ecto/Ecto.Query.API.html#from_now/2)

Still get no results and there are results in the DB to pull.

---

_[View the full topic](https://forum.elixirforum.com/t/ecto-with-dates-comparison/33762)._
