# How to auto calculate values every month or using no. of days?

**URL:** <https://community.glideapps.com/t/how-to-auto-calculate-values-every-month-or-using-no-of-days/41013>\
**Category:** Ask for Help\
**Created:** [April 21, 2022, 9:42am UTC](https://community.glideapps.com/t/how-to-auto-calculate-values-every-month-or-using-no-of-days/41013 "2022-04-21T09:42:49Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [April 23, 2022, 9:37am UTC](https://community.glideapps.com/t/how-to-auto-calculate-values-every-month-or-using-no-of-days/41013/6 "2022-04-23T09:37:57Z")

</div>

Info on how to calculate a month’s number of days.

> [@Fun with Dates](https://community.glideapps.com/t/fun-with-dates/21684/134):
>
> Jean-Claude does not stop here hehe. Darren’s idea made me think about a formula to derive the current month’s number of days. And here we go! Tested some timestamps. N+31-(FLOOR(DAY(N)/16))\*15+1-DAY(N+31-(FLOOR(DAY(N)/16))\*15) - (N+1-DAY(N)) Edit: Realized a bug with 28 is that when you start with dates like 1, 2 in a 31-day month then it does not convert. Back to the drawing board. Edit 2: Derived a way to add 16 days when it’s “day 16 or more”, and 31 days when it’s “less than …

---

_[View the full topic](https://community.glideapps.com/t/how-to-auto-calculate-values-every-month-or-using-no-of-days/41013)._
