You know, I've used DateDIFF in VBA, and I THOUGHT there used to be an Excel 
equivalent.
but when I looked in Excel2010, I didn't find it in the function wizard.

Now it looks like it's THERE, but undocumented.

You can find it in ONLINE help, but not in the help file in Excel.

-----------------------

it's kind-of odd though.

it does some truncating.

the difference between
9/5/2010 and 11/5/2012 is 2 years, 2 months
but the difference between
9/6/2010 and 11/5/2012 is 2 years 1 month.

That's because it says the difference is:
9/5/2010 and 11/5/2012
2 Years , 2 Months and 0 days
and
9/6/2010 and 11/5/2012
2 Years , 1 Months and 30 days
 
it works, but you really need to be careful when doing this kind of date 
calculation.

Paul
-----------------------------------------
“Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can.” - John Wesley
-----------------------------------------




________________________________
From: Ms Excel user <msexcelu...@gmail.com>
To: excel-macros@googlegroups.com
Sent: Mon, November 5, 2012 12:17:10 PM
Subject: Re: $$Excel-Macros$$ Calculate years and months between today daye and 
given date


Hi,

     use this  =DATEDIF(A2,TODAY(),"y")&" Years "& "and 
"&DATEDIF(A2,TODAY(),"ym")&" Months"



 

-- 

Best Regards, 
Ms Excel User    
On Mon, Nov 5, 2012 at 5:11 PM, excel lerner <exceller...@gmail.com> wrote:

Hello sir
>
>Can you please explain how to get completd years ,Months bet ween
>todays date and pevius year date.example
>
>01/04/1954
>05/11/2012
>
>please tell me the formula
>thanq sir
>
>--
>Join official facebook page of this forum @ 
>https://www.facebook.com/discussexcel
>
>FORUM RULES (1120+ members already BANNED for violation)
>
>1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
>Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
>quick attention or may not be answered.
>
>2) Don't post a question in the thread of another member.
>
>3) Don't post questions regarding breaking or bypassing any security measure.
>
>4) Acknowledge the responses you receive, good or bad.
>
>5)  Cross-promotion of, or links to, forums competitive to this forum in 
>signatures are prohibited.
>
>6) Jobs posting is not allowed.
>
>7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
>
>NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
>owners and members are not responsible for any loss.
>---
>You received this message because you are subscribed to the Google Groups "MS 
>EXCEL AND VBA MACROS" group.
>To post to this group, send email to excel-macros@googlegroups.com.
>To unsubscribe from this group, send email to 
>excel-macros+unsubscr...@googlegroups.com.
>Visit this group at http://groups.google.com/group/excel-macros?hl=en.
>
>
>


 

 
  
       
-- 
Join official facebook page of this forum @ 
https://www.facebook.com/discussexcel
 
FORUM RULES (1120+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

 
6) Jobs posting is not allowed.
 
7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum 
owners 
and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.

-- 
Join official facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES (1120+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

6) Jobs posting is not allowed.

7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.


Reply via email to