# If Then Else with scheduled timing doesn't work!

**URL:** <https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634>\
**Category:** Report a Bug\
**Created:** [December 10, 2020, 12:03am UTC](https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634 "2020-12-10T00:03:18Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [December 10, 2020, 12:03am UTC](https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634/1 "2020-12-10T00:03:19Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/1/713c65cc45bbe389fa442f0ae8c917facbdd7460.png)

Has anyone faced the same issue?

The highlighted row shows that the admin is within given period of time. Therefore, it should be 1. It has been working well until few minutes. I didn’t play around with it at all!

---

<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:** [December 10, 2020, 12:16am UTC](https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634/2 "2020-12-10T00:16:15Z")

</div>

So it has been working well since I advised you to do this in the last thread?

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [December 10, 2020, 12:22am UTC](https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634/3 "2020-12-10T00:22:51Z")

</div>

Yes. I followed your steps along with Jeff’s idea and it worked well. By accident I wanted to run a test and found it like that.

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [December 10, 2020, 12:23am UTC](https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634/4 "2020-12-10T00:23:00Z")

</div>

Try checking if the date associated with your Start and End times are “today”. I’m guessing they’re actually those times, but from past dates.

The best thing to do is turn the times into their own values and do less than, or greater than calcs. This will ignore the value of today when comparing times only (as dates, it will look at the full date value, not just the time… Even though the formatting only shows the time).

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [December 10, 2020, 12:38am UTC](https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634/5 "2020-12-10T00:38:14Z")

</div>

This is the “Now” in time only.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/7/6778c8da33f63e2bbd189cddada4decf0db8661c.png)

when I turned it to “Date and Time” it shows me today’s date.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/b/9bda17883dabdc1125cb2b50627e2b29a71f2ebe.png)

This is the Start Time in “Time” only. I entered it manually.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/7/f75c0dfa9190dce508ad0d084488068c2eedce73.png)

When I switched Start Time to “Date and Time” it shows me the past date.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/c/fc34866960e173f51fcec748f8ef3ba965f6e3c9.png)

you are right but how come it was working well for more than 3 days I believe since I set it up!

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [December 10, 2020, 12:40am UTC](https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634/6 "2020-12-10T00:40:06Z")

</div>

@kyleheney what do you mean by turning them into their own values? you mean number columns instead of time?

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [December 10, 2020, 12:53am UTC](https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634/7 "2020-12-10T00:53:55Z")

</div>

It was working because “Now” matched the dates that start and end are using. Now that it’s 3 days later, NOW has updated itself to today’s date, but your start and end times are static dates and are still 3 days ago.

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [December 10, 2020, 1:00am UTC](https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634/8 "2020-12-10T01:00:49Z")

</div>

How to fix it then? Any clue? How to make all of them, Now, Start and End time dynamic?

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [December 10, 2020, 1:00am UTC](https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634/9 "2020-12-10T01:00:59Z")

</div>

What I do is have a sheet with all my time choices in 15 minute intervals (one column). These are in a time format.

In the next column, create a Template that just uses the Time column. This will lock in the first column as text.

In the next column, I have number values for each time (so 5:00 AM in column B becomes 5.00 in column C; 5:15AM corresponds to 5.25AM, 5:30 to 5.50 and so on).

Next, create two template columns in your log sheet to lock in the start and end times as text. In fact, your choice components where you select the start and end times could just use the text values of times and don’t need to be date columns.

Next, create a single relation from your log sheet to the choice sheet with all these time values and numbers. So relate the start time choice to the choices sheet and do a lookup to get the number value that corresponds to the time choice.

Once you’ve done this for the start and end, you should be able to do calcs on those numbers (then convert the result back to a time value, if needed).

You’ll also need to lock in the Now value using a template, if you only need the time and not the date.

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [December 10, 2020, 2:40pm UTC](https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634/10 "2020-12-10T14:40:51Z")

</div>

Your method seems interesting but confusing at the same time.

I have two sheets:

1. User Profile: where I have user email address, timestamp, start time and end time (time format)
2. Check in: Where I have User’s email address and timestamp.

Based on your method, **in user profile on glide** , I created two templates and two number columns (total of 4). Next, **In check in on glide** , I related the user email with the email address of the user in profile sheet to grab the number values. I also **locked “Now Time” using template in check in tab.** When I tried to run math calculations, it didn’t work.

I don’t know if you got my point. Would you mind if I share my app with you in private? so you can run quick review to find the mistake? it is very simple! I just need you to focus on data editor then I can set submission forms etc on the app using the data editor!

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [December 10, 2020, 6:01pm UTC](https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634/11 "2020-12-10T18:01:56Z")

</div>

It worked after watching @Robert_Petitto video on YouTube. It is very much similar to your method @kyleheney but I couldn’t get the point of “own values”. Thank you brother for always helping me with ideas 🙏🏻

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/3/a3ea8dddb105ccfbffd3e59e23a09243f4cdf1c9.jpeg "Dynamic Weekday Start / End Time Conditions with ZERO spreadsheet formulas") ](https://www.youtube.com/watch?v=SanIVHgCjUE)

---

<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:** [March 12, 2024, 5:02pm UTC](https://community.glideapps.com/t/if-then-else-with-scheduled-timing-doesnt-work/19634/12 "2024-03-12T17:02:13Z")

</div>


