# Using If then Else with math/time

**URL:** <https://community.glideapps.com/t/using-if-then-else-with-math-time/63699>\
**Category:** Ask for Help\
**Created:** [July 10, 2023, 2:11am UTC](https://community.glideapps.com/t/using-if-then-else-with-math-time/63699 "2023-07-10T02:11:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan76](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan76/32/15696_2.png) [@Dan76](https://community.glideapps.com/u/Dan76)\
**Post date:** [July 10, 2023, 2:11am UTC](https://community.glideapps.com/t/using-if-then-else-with-math-time/63699/1 "2023-07-10T02:11:16Z")

</div>

Have an app where users try to unlock a screen by entering a code. If they get it correct the screen unlocks and a row is written in a table with the timestamp. If they complete all 10 codes within a certain time they would earn a badge. I have all of this working except the badge aspect as I can’t get the ITE to recognise the time.

How does an ITE column read the time in a math column? As the screenshot shows, all users are getting the badge, even though there are only 2 teams under 30 minutes. I’m guessing there is a quick fix to the format that will solve this. Clearly, typing ‘30’ in there isn’t actually 30 minutes, but I’m unsure what to actually put there.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/d/5dcf6f3435a50ff03d4751809809e5214fcbbad1.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 10, 2023, 2:16am UTC](https://community.glideapps.com/t/using-if-then-else-with-math-time/63699/2 "2023-07-10T02:16:52Z")

</div>

Use a Math column to calculate the duration in whole minutes, then you can do a direct numerical comparison.

```auto
Round((Finish-Start)*1440)

```

---

<div class="post-metadata">

**Author:** ![Dan76](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan76/32/15696_2.png) [@Dan76](https://community.glideapps.com/u/Dan76)\
**Post date:** [July 10, 2023, 2:28am UTC](https://community.glideapps.com/t/using-if-then-else-with-math-time/63699/3 "2023-07-10T02:28:26Z")

</div>

Thank you Darren! 🙏🏻🙂

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [July 11, 2023, 2:29am UTC](https://community.glideapps.com/t/using-if-then-else-with-math-time/63699/4 "2023-07-11T02:29:18Z")

</div>

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