Thread: Date Formulas
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kaz kaz is offline
external usenet poster
 
Posts: 13
Default Date Formulas

i need it to show only days or months or years or all three depending on the
difference between the two dates i.e first date could be 01/02/08 and the
second could be 01/04/08 which would show only 2 days, but the next set of
dates could be 01/02/08 and 01/05/09 so it should show 1 year and 3 days....
are you confused because i am!!

"ShaneDevenshire" wrote:

Hi,

=DATEDIF(B1,B2,"y") whole years between two dates
=DATEDIF(B1,B2,"ym") whoe months between two dates excluding years
=DATEDIF(B1,B2,"md") whole days between two dates ignoring months
where B1 is the start date and B2 is the end date.


--
Thanks,
Shane Devenshire


"kaz" wrote:

Could someone please help with a formula to work out the difference between
two dates and show how many years, months and days there are