# Help with Date/Time

**URL:** <https://community.glideapps.com/t/help-with-date-time/71621>\
**Category:** Ask for Help\
**Tags:** date-math\
**Created:** [March 12, 2024, 2:01pm UTC](https://community.glideapps.com/t/help-with-date-time/71621 "2024-03-12T14:01:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Myles\_Guevremont](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/myles_guevremont/32/68152_2.png) [@Myles\_Guevremont](https://community.glideapps.com/u/Myles_Guevremont)\
**Post date:** [March 12, 2024, 2:01pm UTC](https://community.glideapps.com/t/help-with-date-time/71621/1 "2024-03-12T14:01:24Z")

</div>

I am working on a simple timecard app for my field technicians. The two schedulers in the office enter time in and time out, and the technicians approve these times in the app. I am having some difficulty with entering/calculating times. My schedulers absolutely hate having to use the time picker --they insist on being able to manually type the times.

So, I am having them enter the times as a text entry. This would work just fine; however, Glide automatically assumes that the date is the day that the entry was made. This causes problems because the schedulers will often enter the time in one day and time out the next. For example, they might enter the time in as 7:30 am today, and then tomorrow enter the time out as 3:30 pm. This should calculate to 8.00 hours, but since there are hidden dates, it calculates as 32.00 hours.

I have another column that calculates the date for each day based on the last day of the pay week, so I was thinking maybe I could somehow force the app to default to that date?

Is there any way for me to fix this issue without forcing my users to use the date picker or forcing them to type in the date for each entry in addition to the time? Thanks!!

---

<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, 3:02pm UTC](https://community.glideapps.com/t/help-with-date-time/71621/2 "2024-03-12T15:02:04Z")

</div>

I have a suggestion in mind, but first a question: do they need to enter the exact times, or would it be good enough to round to the nearest 10 or 15 minutes?

---

<div class="post-metadata">

**Author:** ![Myles\_Guevremont](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/myles_guevremont/32/68152_2.png) [@Myles\_Guevremont](https://community.glideapps.com/u/Myles_Guevremont)\
**Post date:** [March 12, 2024, 3:02pm UTC](https://community.glideapps.com/t/help-with-date-time/71621/3 "2024-03-12T15:02:46Z")

</div>

It has to be exact times.

---

<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, 3:08pm UTC](https://community.glideapps.com/t/help-with-date-time/71621/4 "2024-03-12T15:08:47Z")

</div>

Okay, in that case what I would probably do is force the selection of a date, but instead of using a date picker use a choice component and default it to the current date. Then combine that with the entered times to calculate the actual date/time value.

---

<div class="post-metadata">

**Author:** ![Myles\_Guevremont](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/myles_guevremont/32/68152_2.png) [@Myles\_Guevremont](https://community.glideapps.com/u/Myles_Guevremont)\
**Post date:** [March 12, 2024, 3:16pm UTC](https://community.glideapps.com/t/help-with-date-time/71621/5 "2024-03-12T15:16:05Z")

</div>

Okay, I think I get what you’re saying. I’ll give it a shot and report back!

---

<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, 3:17pm UTC](https://community.glideapps.com/t/help-with-date-time/71621/6 "2024-03-12T15:17:02Z")

</div>

> [@Myles\_Guevremont](#):
>
> For example, they might enter the time in as 7:30 am today, and then tomorrow enter the time out as 3:30 pm. This should calculate to 8.00 hours, but since there are hidden dates, it calculates as 32.00 hours.

Actually, just thinking about this a bit more - and assuming that a shift would never span two days - what you could do is simply ignore the date in the time out column. How are you currently calculating the duration?

---

<div class="post-metadata">

**Author:** ![Myles\_Guevremont](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/myles_guevremont/32/68152_2.png) [@Myles\_Guevremont](https://community.glideapps.com/u/Myles_Guevremont)\
**Post date:** [March 12, 2024, 3:20pm UTC](https://community.glideapps.com/t/help-with-date-time/71621/7 "2024-03-12T15:20:15Z")

</div>

I’m calculating the the duration using a date difference column.

Unfortunately, there are rare occasions where the shift spans two days. I could create a special case for these if needed so that the rest of it works.

---

<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, 3:23pm UTC](https://community.glideapps.com/t/help-with-date-time/71621/8 "2024-03-12T15:23:03Z")

</div>

Okay, in that case I think you really need a Date selection.
