# Create countdown based on time submitted

**URL:** <https://community.glideapps.com/t/create-countdown-based-on-time-submitted/2408>\
**Category:** Ask for Help\
**Created:** [November 26, 2019, 4:49am UTC](https://community.glideapps.com/t/create-countdown-based-on-time-submitted/2408 "2019-11-26T04:49:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![gurpal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gurpal/32/596_2.png) [@gurpal](https://community.glideapps.com/u/gurpal)\
**Post date:** [November 26, 2019, 4:49am UTC](https://community.glideapps.com/t/create-countdown-based-on-time-submitted/2408/1 "2019-11-26T04:49:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Karim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/karim/32/13974_2.png) [@Karim](https://community.glideapps.com/u/Karim)\
**Post date:** [November 26, 2019, 6:07am UTC](https://community.glideapps.com/t/create-countdown-based-on-time-submitted/2408/2 "2019-11-26T06:07:40Z")

</div>

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:

> **[Calculating time in Google Sheets: subtract, sum and extract date and time units](https://www.ablebits.com/office-addins-blog/2017/10/19/calculating-time-google-sheets/)**
>
> It's time to talk about the ways of calculating time in Google Sheets. We'll discuss the ways of finding time difference in detail, see how to sum dates and time together, and learn to display only date or time units

---

<div class="post-metadata">

**Author:** ![gurpal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gurpal/32/596_2.png) [@gurpal](https://community.glideapps.com/u/gurpal)\
**Post date:** [November 26, 2019, 9:47am UTC](https://community.glideapps.com/t/create-countdown-based-on-time-submitted/2408/3 "2019-11-26T09:47:37Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Karim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/karim/32/13974_2.png) [@Karim](https://community.glideapps.com/u/Karim)\
**Post date:** [November 26, 2019, 12:10pm UTC](https://community.glideapps.com/t/create-countdown-based-on-time-submitted/2408/4 "2019-11-26T12:10:42Z")

</div>

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](https://support.google.com/docs/answer/3094139?hl=en)

---

<div class="post-metadata">

**Author:** ![gurpal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gurpal/32/596_2.png) [@gurpal](https://community.glideapps.com/u/gurpal)\
**Post date:** [November 26, 2019, 1:19pm UTC](https://community.glideapps.com/t/create-countdown-based-on-time-submitted/2408/5 "2019-11-26T13:19:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![HeddaBO](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/heddabo/32/8531_2.png) [@HeddaBO](https://community.glideapps.com/u/HeddaBO)\
**Post date:** [July 9, 2020, 10:10pm UTC](https://community.glideapps.com/t/create-countdown-based-on-time-submitted/2408/6 "2020-07-09T22:10:38Z")

</div>

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 🙏

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 9, 2020, 10:28pm UTC](https://community.glideapps.com/t/create-countdown-based-on-time-submitted/2408/7 "2020-07-09T22:28:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![HeddaBO](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/heddabo/32/8531_2.png) [@HeddaBO](https://community.glideapps.com/u/HeddaBO)\
**Post date:** [July 9, 2020, 10:44pm UTC](https://community.glideapps.com/t/create-countdown-based-on-time-submitted/2408/8 "2020-07-09T22:44:34Z")

</div>

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? 🤔

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [July 9, 2020, 10:46pm UTC](https://community.glideapps.com/t/create-countdown-based-on-time-submitted/2408/9 "2020-07-09T22:46:33Z")

</div>

> [@Tutorial: Arrayformula in Google Sheets, good practices & how to overcome Arrayformula restrictions with scripts](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727):
>
> Hi, Today I will show you the script that can make copying formulas down work, when it does not work with arrayformula. But first, let’s have some introductions about arrayformula, for those who has not used this before in Google Sheets, some equivalents in Glide and some good practices while using it. I hope it can help you in building your Glide apps as well as applying it in your normal day job. 
> 
> > **1/ Definition**
> >
> > Arrayformula is defined as “a range, mathematical expression using one cell range …

---

<div class="post-metadata">

**Author:** ![HeddaBO](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/heddabo/32/8531_2.png) [@HeddaBO](https://community.glideapps.com/u/HeddaBO)\
**Post date:** [July 10, 2020, 2:35pm UTC](https://community.glideapps.com/t/create-countdown-based-on-time-submitted/2408/10 "2020-07-10T14:35:35Z")

</div>

Great, thanks!
