Hide after x number of days past date

Need to hide item after x number of days.

Date is captured, after say 7 days has past, hide item. Possible? how? Got brain ache (too much gliding!)

Cheers :beers:

1 Like

Have a new column in your GSheet. Enter the formula =ARRAYFORMULA(IF(DATEDIF(A2:A,today(),"D")<7,"Valid","Invalid"))

Assuming your date is in Column A
Then use this column with visibility feature in GDE

2 Likes

create a date column in glide
in your sheet create an arrayformula(be smart here to make one that only calculates for non empty rows) that adds 7 days to the real date you want to add 7 days to so now the date will look normal
Then create an if then else
saying if the new date column we created is today then hide
then in your app set visibility settings if the ifthenelse column is not hide
Edit:mannans way look easier

1 Like

Makes total sense, thanks :pray: will give it a go.

1 Like

Thanks for your suggestion :+1:

1 Like

Let me know if it solves your problem.
With some more complex calculations, we can do the same in the GDE to eliminate lag but that would involve creating many more columns.

Has anyone tried to do it with the new Date Comparison feature in Data Editor?

yes

It worked?

you can not use it with other dates except if you use is

Did try that but couldn’t seem to get it to work, yet. Maybe need more practice :slight_smile:

1 Like

Yes, I gotta try also

2 Likes

Be great it if did work, although suspect will need to calculate on dates which is not possible

Yep, currently we can’t do calculation with dates so it should be handled in the Sheets, either by using Manan’s formula or creating a new column calculating what is the “Date capture + 7 days” value, then compare that using an If > Then > Else in Glide.

1 Like