# Filter collection by math column date

**URL:** <https://community.glideapps.com/t/filter-collection-by-math-column-date/72612>\
**Category:** Ask for Help\
**Created:** [April 16, 2024, 7:06am UTC](https://community.glideapps.com/t/filter-collection-by-math-column-date/72612 "2024-04-16T07:06:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ric\_1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ric_1/32/22052_2.png) [@Ric\_1](https://community.glideapps.com/u/Ric_1)\
**Post date:** [April 16, 2024, 7:06am UTC](https://community.glideapps.com/t/filter-collection-by-math-column-date/72612/1 "2024-04-16T07:06:45Z")

</div>

Hey there, I’m trying to filter a collection where the date field matches a second math column with a date.

- If I use a regular date column that works great
- If I use the math column with a date, I’m not getting any results.

The math column has the value date + 1, which shows the correct result, but the filter doesn’t yield any results. When I use only date (without +1), the result comes out alright.

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [April 16, 2024, 9:33am UTC](https://community.glideapps.com/t/filter-collection-by-math-column-date/72612/2 "2024-04-16T09:33:17Z")

</div>

Sometimes what you see as a timestamp (date-time column) in the data editor is not exactly what you get. The date-time column includes both a date and time, and you might be comparing two values that have the same date but different times.

Two ideas :

1. You could change your date-time columns to a yyyymmdd format and compare those numbers.
2. Make sure the times in the date-time columns are exactly the same, for instance 00:00:00. I’m not sure I would even trust this approach, because you might be able to remove hours, minutes and seconds to get to midnight, but I’m not too sure about milliseconds and beyond. Idea 1 should work.

The following might help:

> [@date Guide: Mastering Dates & Times](https://community.glideapps.com/t/guide-mastering-dates-times/70381):
>
> The Date & Time column contains both a date and time value within one single value. Dates and times can therefore be tricky to understand and to work with. It helps to keep things simple to stay out of trouble. Here are a few tips: Writing dates Avoid writing dates manually. Use a picker instead. If done via import, be weary of the format of the date column in the source. Relations Anytime you create a relation with a date, convert the date to either a string (template column) or a number (…

---

<div class="post-metadata">

**Author:** ![Ric\_1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ric_1/32/22052_2.png) [@Ric\_1](https://community.glideapps.com/u/Ric_1)\
**Post date:** [April 16, 2024, 5:14pm UTC](https://community.glideapps.com/t/filter-collection-by-math-column-date/72612/3 "2024-04-16T17:14:49Z")

</div>

Thanks @nathanaelb your guide was very helpful.

The date format conversion worked did the trick.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [April 23, 2024, 5:15pm UTC](https://community.glideapps.com/t/filter-collection-by-math-column-date/72612/4 "2024-04-23T17:15:35Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
