Hello, how do you find them? One question, is it possible to get the days of a month? For example, I would like to obtain a formula perhaps where I can obtain how many days the current month has, for example if we are in October and this month has 31 days, then I want to return 31, something that is based on the current date.
Use this in a math column:
DAY((Date - DAY(Date) + 32) - DAY(Date - DAY(Date) + 32))
where Date is now or your date.
Took me a while to get this and had to use the other examples in the community as a guide and also ChatGPT to assist
32 seems safe enough, but 45 would be yet safer to stay away from the edges of the month.
Here youâll find a bunch of useful formulas:
oh that also works perfectly - is there a reason why 45 works so well? cause in the solutions in the community I mostly see 45
Itâs just an arbitrary number that is guaranteed to always land somewhere in the middle of the next month, regardless of how many days in the month.
If youâre on the 1st of the month, +32 will bring to the beginning of the following month. Really I think +31 would work too. If you want to land far from the beginning or the end of the month, you need to add two weeks. So as Darren said, +45 is totally arbitrary, but itâs safe to keep you away from the edges.
I see alright, while 32 works, 45 is best. Also, I tried with 31 but it didnât get it right for October.
Thank you both.
Anything between 32 and 56 (or so) should work. 45 happens to be smack in the middle (or just about).
45 simply works because itâs the number our own @Jeff_Hager has chosen.
âMiddle of the monthâ using something like 15 or 45 has more of a purpose when trying to add several months or years to a date. Since each month has a different number of days, the resulting date can sometimes float around, so aiming for the middle of the month allows for some wiggle room when doing the math. In this particular case, 32 works just fine since the goal is just to get to the last day of the current month and 32 puts you safety into the next month.
I have been reading your comments, and I thank all the Glide experts who help me learn new logics that I had not implemented. Every day I continue learning about Glide in conjunction with your comments in different posts.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.