# Date formula

Solved/Closed
-
Posts
2
Registration date
Tuesday September 14, 2010
Status
Member
Last seen
September 14, 2010
-
Hello, I have a problem that I hope you can help me solved, I would like to know how to calculate the number of months between two dates ex: 01/05/2009 as the starting date to 02/27/2010 the reason i would like to be able to show when my next insurance payment is due so the result needs to show as for example 03/27/2010

## 2 replies

Posts
7098
Registration date
Saturday April 7, 2007
Status
Moderator
Last seen
June 10, 2021
489
Hello,

I have considered that your dates were like that in your worksheet then to calculate de difference between two dates :
```          A              B
1       Start           End
2      01/05/09	      02/27/10
```

Thus you can try with this formula in C2 :
=(YEAR(B2)-YEAR(A2))*12+MONTH(B2)-MONTH(A2)

And if you want to know a date with adding a number of months to an other date :
```          A              B
1       Start         Month number
2      01/05/09	         2
```

Try with this formula in C2 :
=MIN(DATE(YEAR(A2),YEAR(A2)+C2+1,0),DATE(YEAR(A2 ),MONTH(A2)+C2,DAY(A2)))

Best regards
Posts
2
Registration date
Tuesday September 14, 2010
Status
Member
Last seen
September 14, 2010

Hi , can any one help me in this ,
that i have used this formula

And if you want to know a date with adding a number of months to an other date :
A B
1 Start Month number
2 01/05/09 2

Tried with this formula in C2 :

=MIN(DATE(YEAR(A2),YEAR(A2)+C2+1,0),DATE(YEAR(A2 ),MONTH(A2)+C2,DAY(A2)))

But i can't able to find the end date.
CAN ANY ONE HELP ME IN THIS .