Create countdown based on time submitted

Hi guys, I am building an app, where I take the current date/time as an input in a form. I use that as the start date/time and then need to add the minutes they have bought as a coupon to make the end time.

From there I need to calculate how much time is left in their coupon. So for example, they buy a 30 min coupon, we can do a countdown when the coupon ends.

Have been trying to figure this out for a few weeks. Anyone can help please?

Hi gurpal,

You can use the start time to which you add 30 minutes to have your end time.
You can use NOW() to get the time at present.
You can use MINUTE() to make a substraction.
Check out:

Hi Karim, thanks for the article.

I have tried it, but the way that Glide sends the data/time to google sheet is
yyyy-mm-ddTHH:mm:ssz

I tried adding the time, but it did not work.

Anything I may be missing?

You have to create a separate column where you apply a TEXT() formula to the data that Glide sends.
This way you will get it in the format that you need
https://support.google.com/docs/answer/3094139?hl=en

1 Like

@Karim, you my dear friend, have helped me solve a problem that I was stuck on for quite a while.
Thank you, kind sir.

1 Like

Hi, I’m having some problems with time calculations. I’m creating and app where they sign in and submit how many weeks old their puppy is. Then I automatically want their profile to change and add one more week to the age each week that passes. The week of the puppy will change what content they will see. Is it possible? Thanks :pray:

If you can have the pup’s birthday on the initial registration then you can do the calculation in the Sheets to return the number of weeks as you want.

1 Like

Yeah, I did that but whenever a new user joins I have to add the formula e.g. it doesn’t automatically update since it’s in google sheet rather than the editor. Or maybe this can be solved in sheets? :thinking:

2 Likes

Great, thanks!

2 Likes