Filter and Visibility for Date Condition

My App/Pages support link:
https://go.glideapps.com/support/24d71d83-0110-4013-803f-91fa07576641

Describe the bug:
I’m working with the time zone UTC+7, and I realize something weird with the filter or visibility when I’m using a date as a condition.

when I’m using the condition “within today”, data will appear at 7 AM my time (that indicates the condition date using UTC).

in my case, this is a problem because “today” data should appear with my timezone because my user sometimes starts accessing my app at 5 AM

so when the user access at 5 AM, data shows data from yesterday or blank.

Expected behavior:
I’m expected the condition date to work with the user’s time zone

How to replicate:
you need to use a different time zone to replicate the situation
using condition date

Link to demo recording:
I’ll update the link later, I need to wait until 12 AM my time to report this bug

This sounds like the same issue as this thread.

I haven’t seen additional reports, but something seems suspicious.

What is the underlying time in most of your date entries? Are they possibly showing as 7am or around that time?

Do you have this checkbox and is it checked or not?
image

I suspect a bug, but answers to this question might help the team diagnose.

1 Like

hi Jeff, thanks for helping.


i don’t have a check box for respect time zones, maybe because i’m using google sheet.

because i tried to change my date format from date only to date and time, but i see, all formats showing 12am.

maybe i’ll try an experiment to combine data from google sheet and glide table for sheets related to date to get respect time zones check box

Yes, that specific checkbox feature is only for glide tables.

OK. I was curious because the person in that other thread had an underlying time in one of his examples that was 9am, but he also was in a timezone 9 hours from GMT. I haven’t byet got a response from them if all of their dates have a 9am time, but based on what you found, maybe that’s not the issue and instead it’s in fact the timezone.

I’d be curious if you find anything in your experimentation.

It almost seems to be timezone related, and maybe it’s a bug introduced when glide added the 'Respect timezone option. @SantiagoPerez, this may be something to look into.

because i can’t sync data automatically from google sheet and Glide Table,

So for a solution, i add another column in my google sheet with the name “Show” with this formula =ARRAYFORMULA(if(A2:A=“”,“”,if(C2:C>=today(),C2:C-today(),“”)))
A2:A is for column ID
C2:C is for the column containing the date

and i change the filter or visibility condition on Glide:
if i want to show today only i’ll set “Show” equals “0”
if i want to show data today and after today, i’ll set “show” is greater or equal to “0”

please make sure Google sheet time zone same as your timezone

i’ll be back tomorrow to give the result of my experiment

If this is the solution, then something is horribly, horribly wrong.

Maybe it’s a bug, as Jeff suggests. But even if it is, there are much simpler workarounds than that.

Try this (in your Glide Table):

  • Create two math columns using the following formulas:
Year(Now) * 10000
+ Month(Now) * 100
+ Day(Now)
  • in the above, replace Now with the special “now” current date/time value
Year(Date) * 10000
+ Month(Date) * 100
+ Day(Date)
  • in the above, replace “Date” with your record dates.
  • Now instead of using “within today” as your filter condition, use “where Math->Now equals Math->Date”
4 Likes

this totally works. thanks a lot.

in my experiment solution, i have a problem i need to wait for someone to refresh the sync data from a google sheet.

but with your solution, it totally works.

1 Like

yeah, as a general rule it’s best to avoid spreadsheet formulas, precisely because of this sync delay.

glad it’s working for you now :+1:

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