# \[solved\] Search for a thing constrained by today's date?

**URL:** <https://forum.bubble.io/t/solved-search-for-a-thing-constrained-by-todays-date/214197>\
**Category:** Need help\
**Created:** [July 5, 2022, 8:41pm UTC](https://forum.bubble.io/t/solved-search-for-a-thing-constrained-by-todays-date/214197 "2022-07-05T20:41:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Viktor](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/viktor/32/134100_2.png) [@Viktor](https://forum.bubble.io/u/Viktor)\
**Post date:** [July 5, 2022, 8:41pm UTC](https://forum.bubble.io/t/solved-search-for-a-thing-constrained-by-todays-date/214197/1 "2022-07-05T20:41:13Z")

</div>

Hey guys, I have this page where I show the list (and a counter in this case) but I need to show only the thing that matches today’s date. **It works as a simple search** for the list and the counter, but when I use the **date as constraint, it shows 0**. Do you know why? Or better practice maybe?  
 ![Captura de tela de 2022-07-05 17-38-06](https://us1.discourse-cdn.com/bubble/original/3X/4/6/46decc0b732b485c14ed6f73d917d59fd5a6bc72.png)

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [July 5, 2022, 8:58pm UTC](https://forum.bubble.io/t/solved-search-for-a-thing-constrained-by-todays-date/214197/2 "2022-07-05T20:58:17Z")

</div>

Hi there, @Viktor… because `Current date/time` is the current date and the exact current time (which means none of the reservations are going to meet that exact criteria), change the equals sign to greater than, and then add the _:rounded down to_ operator after `Current date/time` and select _date_ for the component. You will probably also need to add a second constraint where the date is less than the current date/time plus one day rounded down to date.

Hope this helps.

Best…  
Mike

---

<div class="post-metadata">

**Author:** ![adamhholmes](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/adamhholmes/32/100510_2.png) [@adamhholmes](https://forum.bubble.io/u/adamhholmes)\
**Post date:** [July 5, 2022, 8:59pm UTC](https://forum.bubble.io/t/solved-search-for-a-thing-constrained-by-todays-date/214197/3 "2022-07-05T20:59:43Z")

</div>

> [@Viktor](#):
>
> Do you know why?

Yes…

Current Date/Time doesn’t mean ‘Today’… it means ‘Now’, this precise moment (to the nearest millisecond).

So your current search search will only show reservations who’s date-in field precisely matches the exact millisecond the search was made (which is extremely unlikely to be any).

---

<div class="post-metadata">

**Author:** ![Viktor](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/viktor/32/134100_2.png) [@Viktor](https://forum.bubble.io/u/Viktor)\
**Post date:** [July 5, 2022, 10:00pm UTC](https://forum.bubble.io/t/solved-search-for-a-thing-constrained-by-todays-date/214197/4 "2022-07-05T22:00:29Z")

</div>

> [@mikeloc](#):
>
> add the _:rounded down to_ operator after `Current date/time`

Thanks @mikeloc! As soon as you said it, I remember a really old video about this which I completely forgot for 2 hours aparently rsrs. But just using the :rounded already did the job. Thanks for your time!

---

<div class="post-metadata">

**Author:** ![tylerboodman](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tylerboodman/32/242142_2.png) [@tylerboodman](https://forum.bubble.io/u/tylerboodman)\
**Post date:** [July 6, 2022, 12:52am UTC](https://forum.bubble.io/t/solved-search-for-a-thing-constrained-by-todays-date/214197/5 "2022-07-06T00:52:31Z")

</div>

Also instead of the rounding down you can do Things date/time:extract date = Current date/time:extract Date

---

<div class="post-metadata">

**Author:** ![BrianHenderson](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/brianhenderson/32/231409_2.png) [@BrianHenderson](https://forum.bubble.io/u/BrianHenderson)\
**Post date:** [July 6, 2022, 1:28am UTC](https://forum.bubble.io/t/solved-search-for-a-thing-constrained-by-todays-date/214197/6 "2022-07-06T01:28:32Z")

</div>

@tylerboodman Just be sure you’re getting a date (mm/dd/yy) and not the number of the “date” (dd) when you use operations like that; I’ve been tripped up by that before.

---

<div class="post-metadata">

**Author:** ![tylerboodman](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tylerboodman/32/242142_2.png) [@tylerboodman](https://forum.bubble.io/u/tylerboodman)\
**Post date:** [July 6, 2022, 1:36am UTC](https://forum.bubble.io/t/solved-search-for-a-thing-constrained-by-todays-date/214197/7 "2022-07-06T01:36:22Z")

</div>

Yep good point actually. Thanks

---

<div class="post-metadata">

**Author:** ![ihsanzainal84](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ihsanzainal84/32/245932_2.png) [@ihsanzainal84](https://forum.bubble.io/u/ihsanzainal84)\
**Post date:** [July 6, 2022, 1:38am UTC](https://forum.bubble.io/t/solved-search-for-a-thing-constrained-by-todays-date/214197/8 "2022-07-06T01:38:34Z")

</div>

Hi!

From my experience, the best way to match dates is to format both dates to text.

What i always do is format both dates using :format as Custom yymmdd

Then match them.

Can never go wrong with this.

---

<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:** [September 13, 2022, 8:41pm UTC](https://forum.bubble.io/t/solved-search-for-a-thing-constrained-by-todays-date/214197/9 "2022-09-13T20:41:24Z")

</div>

Closed on September 13, 2022, 8:41pm UTC

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