# 🆕 Comparing Dates

**URL:** <https://community.glideapps.com/t/comparing-dates/12214>\
**Category:** General\
**Created:** [July 9, 2020, 12:56pm UTC](https://community.glideapps.com/t/comparing-dates/12214 "2020-07-09T12:56:20Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [July 9, 2020, 8:05pm UTC](https://community.glideapps.com/t/comparing-dates/12214/21 "2020-07-09T20:05:09Z")

</div>

Glide can’t do date math yet. We’re thinking about this, because we want to get it right.

---

<div class="post-metadata">

**Author:** ![Thibault\_Milan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thibault_milan/32/4970_2.png) [@Thibault\_Milan](https://community.glideapps.com/u/Thibault_Milan)\
**Post date:** [July 9, 2020, 8:25pm UTC](https://community.glideapps.com/t/comparing-dates/12214/22 "2020-07-09T20:25:43Z")

</div>

oh so it worked in my case by pure magic ? 😁 🧙

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [July 9, 2020, 8:28pm UTC](https://community.glideapps.com/t/comparing-dates/12214/23 "2020-07-09T20:28:56Z")

</div>

@Thibault_Milan what are you getting for a result when your dates cross different months?

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [July 9, 2020, 8:47pm UTC](https://community.glideapps.com/t/comparing-dates/12214/24 "2020-07-09T20:47:04Z")

</div>

By coincidence 😉

---

<div class="post-metadata">

**Author:** ![Thibault\_Milan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thibault_milan/32/4970_2.png) [@Thibault\_Milan](https://community.glideapps.com/u/Thibault_Milan)\
**Post date:** [July 9, 2020, 8:53pm UTC](https://community.glideapps.com/t/comparing-dates/12214/25 "2020-07-09T20:53:04Z")

</div>

Something I need to check …  
😆 ok so my date is today `2020-07-09` and `2020-07-10` … which I subtract. Which end in (2020 - 7 - 9 ) - (2020 - 7 - 10) = 1. Coincidence, those two dates should also return 1.

But if my booking date is `2020-08-01` I got … 82 which I cannot explain 😭

ok I not gonna use this in my app.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [July 9, 2020, 8:59pm UTC](https://community.glideapps.com/t/comparing-dates/12214/26 "2020-07-09T20:59:02Z")

</div>

🙌  
Hallelujah!!!

@mark, thank you for taking your time to “get it right”. I’m super impressed with this first step!

👏

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [July 9, 2020, 8:59pm UTC](https://community.glideapps.com/t/comparing-dates/12214/27 "2020-07-09T20:59:08Z")

</div>

Ok, that makes more sense. 20200801-20200709 = 92, so it probably something along those lines that are happening. It’s just treating the values as numbers instead of dates.

---

<div class="post-metadata">

**Author:** ![Yasin\_Hassanien](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yasin_hassanien/32/9042_2.png) [@Yasin\_Hassanien](https://community.glideapps.com/u/Yasin_Hassanien)\
**Post date:** [July 9, 2020, 9:29pm UTC](https://community.glideapps.com/t/comparing-dates/12214/28 "2020-07-09T21:29:06Z")

</div>

Wishing

---

<div class="post-metadata">

**Author:** ![eisenman](https://avatars.discourse-cdn.com/v4/letter/e/53a042/32.png) [@eisenman](https://community.glideapps.com/u/eisenman)\
**Post date:** [July 10, 2020, 1:00am UTC](https://community.glideapps.com/t/comparing-dates/12214/29 "2020-07-10T01:00:30Z")

</div>

In the interest of asking for a mile now that you’ve given us a foot… can you please add ‘week’, ‘month’, and ‘year;’ to the ‘within’ comparison?

---

<div class="post-metadata">

**Author:** ![Rosewebstudio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rosewebstudio/32/12261_2.png) [@Rosewebstudio](https://community.glideapps.com/u/Rosewebstudio)\
**Post date:** [August 12, 2020, 3:45pm UTC](https://community.glideapps.com/t/comparing-dates/12214/30 "2020-08-12T15:45:14Z")

</div>

So, probably easy but help needed. I have a timestamp in a column, I want to calculate a true/false result.

If date stamp within 30 days of today = true, else false

Example  
Time stamp 01/01/2020 today date 25/01/2020 Result = True  
Time Stamp 01/01/2020 today date 15/03/2020 Result = False

Thanks in advance for any help

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 12, 2020, 3:55pm UTC](https://community.glideapps.com/t/comparing-dates/12214/31 "2020-08-12T15:55:37Z")

</div>

Add a column to calculate the “30 days before today” mark in Sheets, something like.

```
={"Compare date";ARRAYFORMULA(IF(A2:A<>"",TODAY()-30,""))}

```

Then do the comparison in the Editor.

---

<div class="post-metadata">

**Author:** ![Rosewebstudio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rosewebstudio/32/12261_2.png) [@Rosewebstudio](https://community.glideapps.com/u/Rosewebstudio)\
**Post date:** [August 12, 2020, 4:08pm UTC](https://community.glideapps.com/t/comparing-dates/12214/32 "2020-08-12T16:08:48Z")

</div>

@ThinhDinh Thank you 🙂

---

<div class="post-metadata">

**Author:** ![Fanny\_Ditomene\_Sekwe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/fanny_ditomene_sekwe/32/10112_2.png) [@Fanny\_Ditomene\_Sekwe](https://community.glideapps.com/u/Fanny_Ditomene_Sekwe)\
**Post date:** [August 13, 2020, 1:58pm UTC](https://community.glideapps.com/t/comparing-dates/12214/33 "2020-08-13T13:58:25Z")

</div>

This is very helpful thanks.  
Would anybody now if it is possible in Glide to calculate the number of days between 2 dates ?  
I can do it in Google sheet with DATEIF. Is there anything similar in Glide. I tried with Math but does not work. Any suggestions ?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [August 13, 2020, 2:13pm UTC](https://community.glideapps.com/t/comparing-dates/12214/34 "2020-08-13T14:13:07Z")

</div>

There is no date calculation at this time.

---

<div class="post-metadata">

**Author:** ![Fanny\_Ditomene\_Sekwe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/fanny_ditomene_sekwe/32/10112_2.png) [@Fanny\_Ditomene\_Sekwe](https://community.glideapps.com/u/Fanny_Ditomene_Sekwe)\
**Post date:** [August 13, 2020, 2:30pm UTC](https://community.glideapps.com/t/comparing-dates/12214/35 "2020-08-13T14:30:06Z")

</div>

No bother, I have already done so much thanks to Glide that I agree to do things manually.  
Cheers Gliders

---

<div class="post-metadata">

**Author:** ![Manan\_Mehta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manan_mehta/32/13957_2.png) [@Manan\_Mehta](https://community.glideapps.com/u/Manan_Mehta)\
**Post date:** [August 21, 2020, 6:10am UTC](https://community.glideapps.com/t/comparing-dates/12214/36 "2020-08-21T06:10:44Z")

</div>

The date is “today” is calculated on the basis of which time zone? I have my app which has users from various time zones and I assumed it works on the device’s current timezone but I think I am getting errors there.  
Does this work on a fixed timezone?

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [August 21, 2020, 6:31am UTC](https://community.glideapps.com/t/comparing-dates/12214/37 "2020-08-21T06:31:05Z")

</div>

Seems helpful but beginners, like me, need tutorials 😅

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [August 21, 2020, 11:36am UTC](https://community.glideapps.com/t/comparing-dates/12214/38 "2020-08-21T11:36:50Z")

</div>

I would have to assume that it’s the device time and most conditions are determined on the device itself. What kind of errors are you getting?

---

<div class="post-metadata">

**Author:** ![GioRinaldi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/giorinaldi/32/11069_2.png) [@GioRinaldi](https://community.glideapps.com/u/GioRinaldi)\
**Post date:** [August 21, 2020, 11:37am UTC](https://community.glideapps.com/t/comparing-dates/12214/39 "2020-08-21T11:37:55Z")

</div>

Good 👍

---

<div class="post-metadata">

**Author:** ![Manan\_Mehta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manan_mehta/32/13957_2.png) [@Manan\_Mehta](https://community.glideapps.com/u/Manan_Mehta)\
**Post date:** [August 21, 2020, 11:40am UTC](https://community.glideapps.com/t/comparing-dates/12214/40 "2020-08-21T11:40:58Z")

</div>

I have a column that says present or past based on if date for a form submission is “within today” or not.  
These forms are filled by people around the world and the Present/Past value change on basis of a fixed timezone I think. So sometimes for a user on another side of the world the date of the form submission and current date is the same in their timezone but it still shows Past and not Present.

[Previous page](https://community.glideapps.com/t/comparing-dates/12214.md?page=1)

[Next page](https://community.glideapps.com/t/comparing-dates/12214.md?page=3)
