Fun with Dates

Not easily, but if you’re willing to put in some work, this is the only solution I know of that’s contained within Glide and shows a count in real time (Not in add/edit/form mode).

3 Likes

Damn @Jeff_Hager , you’re the Lord.

image

4 Likes

If you are only counting characters on numeric columns, I think you can skip the ‘1’ column and the template column and just do the math directly on the numeric column.

3 Likes

Actually I’m using both, and it worked perfectly

3 Likes

Greetings,
I have a problem, I’m trying to add dates, but specifically months. Ex: today (02/05/2021 + 18 months) trying to do it by MATH, but the expressions DATEM or Month are not valid.
Can someone help me?

Sorry for the writing I’m using google translator …

Here you go. Just use 1.5 years for the number of years, or you can take your number of months and divide by 12. Same thing either way.

3 Likes

Quick Q - can’t think… :thinking:

Using 'glide tables’

I need to calculate the day from a date so ‘NOW’ = ‘Wednesday’ (in the uk)

Day(NOW) will give you the day (number) of the week, then plug that into an ITE

1 Like

Used this in a recent app for a client — check it out:

4 Likes

@Jeff_Hager perhaps a flaw here?

Makes sense, I think
‘Now’ is always going to be ‘Now’ :slightly_smiling_face:

1 Like

I solved it—had to use a math column to convert the text to a date and then pass the math column instead:

Screen Shot 2021-02-10 at 10.48.35 AM

2 Likes

This is awesome. I can make completed task to be removed after a few months. Or I can do reminders for uncompleted task. Idea is on creating a task, a static date would be inputed. month from now, and in a second col. If today is past then show red color. Need to think. Anyway Will need to test this out very soon. Working on 2 projects currently. I am completely overloaded plus my normal day job.

1 Like

That’s weird. I had assumed that once the text is placed into a date column, it’s then converted to a date and becomes static. So you’re saying that the text version is still buried somewhere in that date column, which makes it dynamic? I’ll have to play around with that some more. I have some ideas that I’ve been thinking about to rework my calendar app to use methods like this to have reoccurring events, but with only one row.

Ya, if you take a look at the screenshots above in my second post, you can see that the “1 month from now” value resides in the spreadsheet and not the date. Converting it to a math column first, though, solves it.

3 Likes

That’s really good to know!

3 Likes

@Jeff_Hager What’s the best way to do “days since” in Glide? I feel like the time in a date time throws off any sort of floor/ceiling/rounding that I do. Should I strip out the time using a template column first? Hate to create unnecessary columns if it can be solved elegantly in a single Math Column.

Are you just looking for the fact that the day changed? So for example the difference from yesterday noon to today 9am is less than a day. Do you want a result of 1 day? Same if it was today 11:59pm, it would still be 1 day. And after midnight it would become 2 days?

Correct. If I create an event today, then date difference is 0 until 11:59 tonight. Tomorrow, that event will be 1 day since creation.

Ok, when I have a little bit of free time, I’ll see what I can come up with.

There is some stuff somewhere on here regarding ordinal dates, which might work for doing this. Unless I think of something simpler.

3 Likes