This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I want to count the amount of days within one month between two dates. For example, if the start date is 8/1/2017 and the end date is 10/31/2017, I want to return 31 because there are 31 days in August and when I run it again in September, I'd want it to return 30.
I tried using DATETIMEDIFF but that didn't include the part of days within a certain month. Is that doable?
I updated the formula to include the +1 but it still seems to be including the entire range. In your example below, you have the two dates as within the same month. If the two dates are in different months (which is what I have), should that do the same?
An example from my data set is: start date 8/1/2017 & end date 10/25/2017
Thanks for the attachment! Just reading the formula you added, I think it should work. However, I'm noticing that I can't add the date column name in place of the "Start" and "End" in your formula. Is it possible to use this formula while referring to a column field where all the values in the column are dates as oppose to a particular date value?
Here's a sample of the date structure in our data (I can't send the actual file since it contains client information)
Days in August
What I was hoping to do was use the formula you mentioned, but reference the "Start Date" and "End Date" column headers so that I can apply it to each row. I'm pretty sure your formula would do the same thing, output-wise, as what I have in the third column, though I'm not sure it includes the "N/A" portion when there are no days in that month.
Hi, I created a reportdate_id for unique report date, I want to generate dates between every two unique report dates and load it in to a different table. I am thinking to create a macro to do that but not sure how. Can anyone help me with that ?