Want to find the difference between two dates and return the corresponding number of months.
For example Let say: Begin Date and End Date and they both have values 01/01/05 and 31/12/05 respectively. Now I want to find the difference but in months only. With the above example the number of months will be 12.
Any ideas please!
Few years ago we were not existing and few years to come we would be in the grave! So what will benefit us in the grave?
0
Comments
31/01/06 and 01/02/06 will be 1 month or 0?
between 01/01/06 and 28/02/06 will be 1 or 2?
Please, more details needed. But best thing will be to use DATE2DMY function to take numbers of month and year for each date and calculate the values from this...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
The problem with this type of code is 01 Jan 07 to 01 Feb 07 will return 2 Months.
When it is only 1 month 1 day!
31/01/06 and 01/02/06 will be 1 month
between 01/01/06 and 28/02/06 will be 2 Months
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
Here the dates are going to be standard...Payments are made monthly...thus the dates will be begin of month to end of month respectively.
Ok will try these and get back.
Thanks.
Its working perfect.