# Filtering based on date only, not time

**URL:** <https://forum.bubble.io/t/filtering-based-on-date-only-not-time/169525>\
**Category:** Need help\
**Created:** [September 15, 2021, 11:52pm UTC](https://forum.bubble.io/t/filtering-based-on-date-only-not-time/169525 "2021-09-15T23:52:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![neilgellett](https://avatars.discourse-cdn.com/v4/letter/n/ecb155/32.png) [@neilgellett](https://forum.bubble.io/u/neilgellett)\
**Post date:** [September 15, 2021, 11:52pm UTC](https://forum.bubble.io/t/filtering-based-on-date-only-not-time/169525/1 "2021-09-15T23:52:27Z")

</div>

Hi,

Hopefully a quick one. Whenever I store a date without picking a specific time it stores both the date and the time as 12:00 - doesn’t matter if I just format as date only.

Then when I want to filter results in a repeating group, and I want to just pick records on say today, it doesn’t return any results, even though there are records with todays date.

My assumption is because in my method using current date/time the date matches, but the time doesn’t match because it is not 12:00 - but can find the method to resolve.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/3/2/32894a8ddf17ea566472a16e3db6ddc75a5e25e6.png)

Help appreciated.

Neil

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [September 16, 2021, 12:01am UTC](https://forum.bubble.io/t/filtering-based-on-date-only-not-time/169525/2 "2021-09-16T00:01:00Z")

</div>

Hey @neilgellett 👋

I think you are correct!

There are a few different ways to do this. You can save the fields in the database by date rounded down to day. Or…

If your data actually says 12:00am midnight. You can just try what you have but `rounded down to day.`

What I sometimes do is just create two constraints.

`When >= Current date/time rounded to day.`

&

`When < Current date/time rounded to day (+ day) 1.`

Would that work for what you are looking for?

Hope that helps! 😊

@j805 [www.NoCodeMinute.com](http://www.nocodeminute.com/)

For All Your No-Code Education Needs:

- [One-on-One Tutoring](https://www.nocodeminute.com/?page=tutoring)

- [eLearning Hub](https://www.nocodeminute.com/signup)

- [Video Tutorials](https://www.nocodeminute.com/1-minute)

- [Subscribe to Free Videos on YouTube](https://m.youtube.com/channel/UC0a7cARD26mbV9YiMu0nLaw)

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [September 16, 2021, 12:03am UTC](https://forum.bubble.io/t/filtering-based-on-date-only-not-time/169525/3 "2021-09-16T00:03:46Z")

</div>

> [@J805](#):
>
> When \< Current date/time rounded to day (+ day) 1.

@dave13

This is what I was thinking of earlier. Less steps than What we did.

---

<div class="post-metadata">

**Author:** ![equibodyapp](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/equibodyapp/32/159574_2.png) [@equibodyapp](https://forum.bubble.io/u/equibodyapp)\
**Post date:** [September 16, 2021, 1:26am UTC](https://forum.bubble.io/t/filtering-based-on-date-only-not-time/169525/4 "2021-09-16T01:26:45Z")

</div>

I used ‘change hours to 0, change minutes to 0 and change seconds to 0’ on both saving date and using current date as a search parameter 🙂

---

<div class="post-metadata">

**Author:** ![neilgellett](https://avatars.discourse-cdn.com/v4/letter/n/ecb155/32.png) [@neilgellett](https://forum.bubble.io/u/neilgellett)\
**Post date:** [September 16, 2021, 3:39am UTC](https://forum.bubble.io/t/filtering-based-on-date-only-not-time/169525/5 "2021-09-16T03:39:00Z")

</div>

Thank you for the reply. You method worked perfect.

---

<div class="post-metadata">

**Author:** ![neilgellett](https://avatars.discourse-cdn.com/v4/letter/n/ecb155/32.png) [@neilgellett](https://forum.bubble.io/u/neilgellett)\
**Post date:** [September 16, 2021, 3:40am UTC](https://forum.bubble.io/t/filtering-based-on-date-only-not-time/169525/6 "2021-09-16T03:40:05Z")

</div>

Thanks for the reply. Its amazing how all the solutions proposed here work, Thanks once again

---

<div class="post-metadata">

**Author:** ![neilgellett](https://avatars.discourse-cdn.com/v4/letter/n/ecb155/32.png) [@neilgellett](https://forum.bubble.io/u/neilgellett)\
**Post date:** [September 16, 2021, 3:40am UTC](https://forum.bubble.io/t/filtering-based-on-date-only-not-time/169525/7 "2021-09-16T03:40:26Z")

</div>

Works perfect!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [November 24, 2021, 11:53pm UTC](https://forum.bubble.io/t/filtering-based-on-date-only-not-time/169525/8 "2021-11-24T23:53:01Z")

</div>

Closed on November 24, 2021, 11:53pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
