# Round date time

**URL:** <https://community.glideapps.com/t/round-date-time/68365>\
**Category:** Ask for Help\
**Tags:** data-editor\
**Created:** [December 5, 2023, 3:58am UTC](https://community.glideapps.com/t/round-date-time/68365 "2023-12-05T03:58:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikaeldorval](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mikaeldorval/32/67405_2.png) [@Mikaeldorval](https://community.glideapps.com/u/Mikaeldorval)\
**Post date:** [December 5, 2023, 3:58am UTC](https://community.glideapps.com/t/round-date-time/68365/1 "2023-12-05T03:58:26Z")

</div>

Hi Gliders,

I built a punch system for one of my clients and he’d like to have the ins and outs date times to be rounded to 15 minutes.

Examples:

Employee clocks in at 7:04 AM  
App records 7:04 but shows 7:00

Employee clocks in at 8:09 AM  
App records 8:09 but shows 8:15

Employee clocks out at 10:57 AM  
App records 10:57AM but shows 11h AM

It would produce a cleaner payroll and prevent employees from complaining to management to round their punch in/out times.

I can’t find an answer anywhere.

I tried to isolate the minutes and rounding that number but that means extra columns that could be done with maybe only 1-2 if there’s a formula or function for that. It also means rounding the hours like 23 to 00 and years and days… And then formatting the final result to a date. I started working on it but it’s a headache working with so many columns to achieve the result I want and I wonder if there is a better way I’m not aware of?

Thanks in advance for your replies!

---

<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:** [December 5, 2023, 4:40am UTC](https://community.glideapps.com/t/round-date-time/68365/2 "2023-12-05T04:40:46Z")

</div>

Try this in a math column.

```auto
Date-(MINUTE(Date)/1440)+
(ROUND(MINUTE(Date)/60*4)*15/1440)

```

---

<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:** [December 5, 2023, 5:38am UTC](https://community.glideapps.com/t/round-date-time/68365/3 "2023-12-05T05:38:54Z")

</div>

If seconds are vital for accuracy, here is another version that is accurate down to the second.

```auto
Date-(MINUTE(Date)/1440)-(SECOND(Date)/86400)+
(ROUND((MINUTE(Date)+SECOND(Date)/60)/60*4)*15/1440)

```

---

<div class="post-metadata">

**Author:** ![Mikaeldorval](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mikaeldorval/32/67405_2.png) [@Mikaeldorval](https://community.glideapps.com/u/Mikaeldorval)\
**Post date:** [December 5, 2023, 10:27pm UTC](https://community.glideapps.com/t/round-date-time/68365/4 "2023-12-05T22:27:10Z")

</div>

Thank you that worked!

---

<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:** [December 12, 2023, 10:28pm UTC](https://community.glideapps.com/t/round-date-time/68365/5 "2023-12-12T22:28:09Z")

</div>

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