Current date and time

Hello everyone!
While building a birthday reminder for the colleagues on our platform, I faced an issue. Could you help me with that?
The current date (is taken through Math column → now) is compared with the date of the birthday and then through if colomn the notification is shown.

Everything works great in Glide and in Chrome on my Mac. But on other devices nothing is visible (doesn’t matter whose account is singed in. My iPhone or Safari browser do not show the item as well as Home on my colleagues Mac and PC).

What is going on? Am I missing something? The same thing happens when I just place the date and time taken from Math column.

Thank you for any reply

This is how it looks in my Chrome

Anywhere else

It really shouldn’t matter mathematically, but the parenthesis should not be necessary if you are just returning the Now value in your math column. Try removing the parenthesis.

They remained there from the last iteration. Tried to get rid of them. Unfortunately, didn’t help

1 Like

I’m surprised the date and time aren’t at least showing on the screen. My only thought is that the screen isn’t attached to a row for some reason, so it has nothing to show. Do you have any filters on the screen itself? Are you maybe utilizing row owners in a way that no rows are accessible?

It is interesting. There is a filter (but just on the item, not on a screen). I filter the rows according to the notification message taken from if then else column. When I delete the filter, all other rows apart the one with the notification become visible everywhere. The only exception — my Chrome session, there everything is shown.

The information is taken from Users table. Does it all make any sense?

And still, the most surprising thing for me is that in Glide viewing as any user everything is shown properly when the filter is set up

I’m sure we’re just missing something small, but I’m not sure what that would be. Can you share some more screenshot showing how things are set up and configured? I’m not sure what exactly I need to see, so anything you can provide would be useful. I still feel like there is a visibility, filter, or row owner in play here.

Here is how everything is set up. I add the date of the birthday (the exact day and the day before). In the column Math there is a current date. Then I take just a date without a year from the current date (through Split Text and then Single Value). There is a template for adding names to the notifications.

The only filter is the one that is responsible for getting rid of the empty rows. There are no filters on the screen (I even created a new one).

Ok, it might be something with the way you are comparing your dates, which can become unstable depending on different browsers and operating systems. For one, you are converting everything to text. For another, you are splitting a date into it’s text elements.

How are you obtaining the ‘Birthday’ and ‘Birthday minus Day’ values? Preferably they would be a number in MMDD format.

I guesswould take a different approach.

First a math column to get the current date:

Month(Now)*100+Day(Now)

Another math column to get the current date + 1.

Month(Now+1)*100+Day(Now+1)

Then if you have have your birthday as a MMDD, you can directly compare the number to your two math columns.

Converting to numbers will be a lot safer, because you are not reliant on the text formatting of dates, which could differ based on a user’s region, browser, or OS.

5 Likes

Thank you very much! Don’t know how but the combination of both approaches helped. Now I will be deleting the extra columns one by one to figure out when the whole thing breaks

Oops! Feels the problem hasn’t been solved… Nothings has worked yet.
The only reason everything was displayed correctly for a while was my mistake in the date. Now here we are again…

Hola Dmitrii

There are some issues that I would fix to avoid problems with devices with different regional settings:

Your column Birth minus day should be a Date column instead of a Text one.
If you write October 4, this can be fine for some devices with date settings like MMMd but your logic will fail if a device uses date settings MMMM dd (October 04 or May 03).

That missing zero in the day format will break your logic, so you have to change it

Try with this:

  1. Create a new Birth minus day column as a Date column selecting “Respect time zones” option and write your values.
    image
  2. Modify your If-Then-Else column to work with a Date column
  3. Let us know your results please.

Saludos!

1 Like

Hola!

Have already done it. Unfortunately, didn’t help(

1 Like

The below sets off a giant alarm bell for me:

The above is guaranteed to fail on some devices, as not every device will use the same date format.

I find it difficult to believe that the approach that Jeff described does not work. In fact, I don’t believe that it doesn’t work.

Can you show screen shots of how you have set it up following Jeff’s instructions?

4 Likes

I hope there is something wrong in what I am doing, because Jeff’s approach looked so logical

First, I added the date column and chose “respect time zones”. The format is "date only’, short. Then I split it and create a joined text to get rid of “/”. I did it twice: with the birthday date and with the date - 1 day — for two notifications: “the birthday is tomorrow” and “the birthday is today”.

Then I created math columns and used the approach kindly suggested by Jeff. The only different is that the second math column contains (Now-1), not +1. I tried with both variants anyway.

Finally, there is a notification If-else-then column.

The notification in the table is displayed correctly. On the screen as well. These are the only places where the component is shown

No, no, no - don’t do all that.

Here - watch this:

The above will work reliably on all devices.

7 Likes

You’re so smooth, Darren.

2 Likes

Thank you! Now it works!
Spent much time on this one and feels that started making it waaaay more complicated than it really was. Thank you once again for such a great tutorial!

3 Likes

Hola de nuevo!

I’m late to the solution but anyway, here my solution to complement Jeff and Darren’s idea. Fortunately, Glide gives you more than 1 option to solve a problem.

Here my workaround using text only (converting a Date into Text with “respect time zones” marked)

This looks like using US format (English)

instead, with Latin American format (Spanish):

… the result is the same!

The key is to keep the date format the same wherever it is used, I used in this case MMMM dd

image

image

Saludos!

1 Like

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