# ๐ Comparing Dates

You can now compare two dates in Glide as opposed to comparing to only โTodayโ or โNowโ.

30 Likes

This is AMAZING (the fact that it was requested at the start of the week and it is live!).

4 Likes

2 Likes

All hail the Glide team!

5 Likes

Please withdraw this function: Iโve spent the night to build something with โ1000โ relations & lookup & etc columns (that I already do not understand any more) to do exactly what you doโฆ in 1 clic!

Great!

14 Likes

This hopefully gives me some work to do in my app. Still hoping for filtering on a relation column. Then Iโll be golden.

4 Likes

You can do math operation on dates too btw. That was my first implementation of date comparaison. But WAY EASIER now

4 Likes

How did you do calculations on โdatesโ?

I tried the formula (T - DS) / F โฆ Iโm not a rock star in maths, but I have my doubt on the resultโฆ

1 Like

Is that just a date or a timestamp? Have you tried converting it to days?

1 Like

Interesting indeed!
In my example, both T & DS fields are date I think. How come that there is a .52 while 12 - 2 = 10.00? Is it due to the fact that even if not displayed, it takes into account the hours? (if โyesโ, arrgh, doesnโt comply with my need).

Yes! I have a very specific use case for this, subscriptions!

1 Like

Can you try making two template columns from those and do math on those columns instead?

It doesnโt like it very muchโฆ I think Iโll stay with my current solution at this stage (even if very it intricates multiple relation, lookups & co), notably because I found Glide very weak with regards to โDateโ management in EU format. But thanks (again!) for trying to help.

(t_) = template columns

What does it return at the start, you applied the division already right? Any chance itโs 100000?

Yes, I applied the division directly in the initial calculation. If I withdraw it it gives 5000000 โฆ

What does 5 and 10 mean in this context? I see you have a 2,00 value in one column.

Thank you for adding this. It should help in many ways!

So awesome to see that there is an easy way to do this now! On my app users collect eggs that age and hatch accordingly. This will rock to have the app choose a photo to display based on the number of days since collection!!!

Weird, for just two date operation itโs still in days

But as soon as I apply number like a `/2` it converted in timestamp