Hello,
I have an inquiry regarding calculating the number of days between two dates, using DAYS360, when all months are assumed to be 30 days. For reference, we bill all months as 30days, 360 days a year. That being said there are a couple exceptions regarding February.
- If the Start Date <= February 1 and the End Date = February 28, February is considered to have 30 days, plus the number of days from the Start Date, i.e. 1/15/2023 - 2/28/2023 = 46 days, or 2/01/2023 - 2/28/2023 = 30 days.
- If the Start Date >= February 2 and the End Date is <= February 28 then February is calculated by actual days, i.e. 2/2/2023 - 2/28/2023 = 27 days.
- If the Start Date = February 28 and the End Date > February 28, then February is considered to have 3 days, plus the number of days until the End Date, i.e. 2/28/2023 - 3/15/2023 = 18 days.
I have tried using a simple =DAYS360($A2,$B2)+1 but the results vary, depending on the month. 10/01/2022 - 12/31/2022 should be 90 days, but DAYS360 +1 make it 91, whereas 10/01/2022 - 9/30/2023 calculates 359 if I don't put the +1 to include the Start Date.
Additionally, I have tried using =DAYS360($A2,$B2)+(IF(AND(MONTH($B2)=2,DAY($B2)=28),2,0))+1, which works to an extent, but I run into the same issues described above.
Any help is greatly appreciated and all notes are contained here and in the spreadsheet.
Bookmarks