# Equality operator failing on Datetime objects

**URL:** <https://community.appfarm.io/t/equality-operator-failing-on-datetime-objects/2076>\
**Category:** Bug reports\
**Tags:** app-data\
**Created:** [October 9, 2025, 4:26pm UTC](https://community.appfarm.io/t/equality-operator-failing-on-datetime-objects/2076 "2025-10-09T16:26:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vetle.huglen](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/vetle.huglen/32/2571_2.png) [@vetle.huglen](https://community.appfarm.io/u/vetle.huglen)\
**Post date:** [October 9, 2025, 4:26pm UTC](https://community.appfarm.io/t/equality-operator-failing-on-datetime-objects/2076/1 "2025-10-09T16:26:16Z")

</div>

I am trying to read objects based on a timestamp referencing the beginning of an hour, as such:

 ![Screenshot 2025-10-09 at 18.21.30](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/2X/b/bde4b5f279cee41c337f850116a9d5329ead6902.png)

The filter returns no objects, even though there are plenty of persisted objects with “Time: Start” set from exactly the same object I am using in the filter:

![Screenshot 2025-10-09 at 18.22.42](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/2X/2/2fe855c8f5d3196721a557dc03953ab23b2459dc.png)

Are there any known bugs with floating point rounding or similar when comparing datetimes with equality operator? Or could there be underlying differences in format? This is very annoying, as I have no other convenient way of doing the filtering.

---

<div class="post-metadata">

**Author:** ![Olav](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/olav/32/63_2.png) [@Olav](https://community.appfarm.io/u/Olav)\
**Post date:** [October 10, 2025, 6:50am UTC](https://community.appfarm.io/t/equality-operator-failing-on-datetime-objects/2076/2 "2025-10-10T06:50:03Z")

</div>

Hi, and thank you for reaching out!

Two questions:

- Is this action run from a shareable component?
- Have you verified that the timestamps you are comparing are exactly equal down to the millisecond?

---

<div class="post-metadata">

**Author:** ![vetle.huglen](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/vetle.huglen/32/2571_2.png) [@vetle.huglen](https://community.appfarm.io/u/vetle.huglen)\
**Post date:** [October 10, 2025, 9:43am UTC](https://community.appfarm.io/t/equality-operator-failing-on-datetime-objects/2076/3 "2025-10-10T09:43:56Z")

</div>

1. The app is run from a service - happy to share, but unsure how?
2. Logging the datetime with .toISOString() results in the exact same datetime, down to the millisecond. I have also tried multiple methods for making sure the datetime is exactly hh:00:00.000z format, like using the built-in “go to start of hour” as well as JavaScript’s setMinutes(0, 0, 0).

---

<div class="post-metadata">

**Author:** ![Olav](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/olav/32/63_2.png) [@Olav](https://community.appfarm.io/u/Olav)\
**Post date:** [October 15, 2025, 12:09pm UTC](https://community.appfarm.io/t/equality-operator-failing-on-datetime-objects/2076/4 "2025-10-15T12:09:45Z")

</div>

This issue was resolved in DMs. We did not uncover any bugs with the equality operator on datetime objects.
