Use Date value from one table to compare to dates in another table

Stuck with this one…

Imagine I have two tables:

Table A:

  • Has just a single row, with multiple columns
  • One of those columns is a date (update: it’s actually an if-then-else column, operating on date columns. An important point I initially overlooked…)

Table B:

  • Has multiple rows, and multiple columns
  • One of those columns is a date

What I want to do is use the Table A date column in Table B, in an if-then-else column to compare it to the dates in Table B. Problem is, when I bring it in as either a Single Value or Lookup via a (single) relation, Glide no longer thinks it’s a date, so I can’t do date-type comparisons (after, before, etc).

Anyone have an idea how I can work around that?

… actually it just occurred to me that I can probably convert all the dates in both tables to integers, and then do a direct numerical comparison - but that feels really clunky :woozy_face:

Add a math column to convert a lookup column to a date


Off to get my COVID jab now :syringe:, but will give that a try later

That’s the one I reckon

Ah, my solution, it doesn’t work
I did some tests and if the source of your lookup is an if column (for example) it doesn’t work.
For the moment, well no solution.

uh checkmate
I looked for several solutions but nothing.
Obviously the “before, after, …” conditions only work with Date or Date source fields.
Maybe after your :syringe: , you will have a brilliant idea.

Are you using the SV > latest?

Latest, etc aren’t options. I think the problem is (as @Manu.n pointed out), that the source column is an if-then-else (operating on date columns). Even though it gives a date as a result, it seems that Glide no longer treats it as a date when I pull it into my second table.

I’m going to have to fiddle with this, and think about it a bit more.

Completely open to any bright ideas :slight_smile:

I found a solution, which was essentially this:

It’s actually not that ugly. It will work.