Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 59
Default I need to find out the YEAR, MONTH, DAY between two dates

I need to find out the YEAR, MONTH, DAY between two dates. for example:
A1:19/05/05 and A2: 30/06/06. How can I have to difference in year, month,
day.
If 0 year, automatically the result must be run out in month, day and so on.

Please send me the formula.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default I need to find out the YEAR, MONTH, DAY between two dates

=DATEDIF(A1,A2,"Y")

=DATEDIF(A1,A2,"YM")

=DATEDIF(A1,A2,"MD")

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"jimmy" wrote in message
...
I need to find out the YEAR, MONTH, DAY between two dates. for example:
A1:19/05/05 and A2: 30/06/06. How can I have to difference in year, month,
day.
If 0 year, automatically the result must be run out in month, day and so

on.

Please send me the formula.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,047
Default I need to find out the YEAR, MONTH, DAY between two dates

=datedif(a1,a2,"y")& "years, "&datedif(a1,a2,"ym")&"months,
"&datedif(a1,a2,"md")&" days."

hth
regards from Brazil
Marcelo

"jimmy" escreveu:

I need to find out the YEAR, MONTH, DAY between two dates. for example:
A1:19/05/05 and A2: 30/06/06. How can I have to difference in year, month,
day.
If 0 year, automatically the result must be run out in month, day and so on.

Please send me the formula.

Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort by Month and Year Yoshi Excel Discussion (Misc queries) 1 February 2nd 06 11:03 PM
Dates of a Day for a month & year cell formulas mikeburg Excel Discussion (Misc queries) 2 December 29th 05 10:14 PM
How sort dates just by day/month and NOT year if all 3 given in ce smags Excel Worksheet Functions 1 January 25th 05 03:45 AM
How to sort by day and month while ignoring year? Robert Judge Excel Worksheet Functions 4 December 23rd 04 11:37 PM
Insert Month and Year in my worksheet Myrna Excel Worksheet Functions 1 November 8th 04 01:29 AM


All times are GMT +1. The time now is 05:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"