Days in a month in Date Range

Hello All,

I have a record with data range. From the 15th of January to the 15th of February.

Is there any way to know how much days this date range overlaps in January and same in February ?

Thank you !

no one ?

Did you try to minus one fron the other ans get the days? If I remember correctly I think you can do that

Hi, @karacrystal… I’m not sure if AliFarahat has answered your question, but if not, maybe you mean something like this?

dateRangeDays

If so, the days in second month part is pretty uninteresting because it’s just the number of days into the second month of the range (easily derived by extracting the date from the end date of the range).

For the days in first month, I created an option set with the months of the year, their corresponding month number, and the number of days in each month. Then, I used the option set as follows to get the number of days in the first month:

I have no idea if this solution meets your needs, but if I understand your question correctly, well, it does seem to work. Hope this helps!

Best…
Mike

1 Like

Thank you both,

I will try and let you know.
My ultimate goal is the following:

1- Create date ranges corresponding to reservation (hotel nights for instance).
2- Being able to graph those (e.g.: 15 nights booked in January and 15 in January).

I tried to create a single record each day within the date range but also have issues with this.

If there was a way to “sum” all nights in a date range that are within the given month then I could use it to do some charts.

This topic was automatically closed after 70 days. New replies are no longer allowed.