date conversion

gronkette1

Board Regular
Joined
Mar 12, 2002
Messages
90
This is probably very basic, but:

I need to do the following:

today's date minus birthdate = years of service....

thanks
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
On 2002-03-27 11:32, gronkette1 wrote:
This is probably very basic, but:

I need to do the following:

today's date minus birthdate = years of service....

thanks

Hi gronkette1:
If birthdate is 3/1/81 and is entered in cell A1, then

=year(today())-year(A1)

will give you the age in years -- it may not necessarily give you the years of service ... Ha Ha!


_________________
Yogi Anand
Edit: Deleted inactive web site reference from hard coded signature
This message was edited by Yogi Anand on 2003-01-19 15:00
 
Upvote 0
To calculate the difference in years,
with Earliest Date in A1 and Latest date in B1, use =Datedif(A1,B1,"y") You could use today() for latest date.

Note. Datedif is in most versions of Excel but it was only documented in Excel 2000.

You can expand Datedif to show months, and days (Some anomalies with days). The following also includes text "Years" etc.

=DATEDIF(A40,A38,"y")&" years, "&DATEDIF(A40,A38,"ym")&" months"
This message was edited by Dave Patton on 2002-03-27 12:53
 
Upvote 0
Note. Datedif is in most versions of Excel but it was only documented in Excel 2000.

Thanks Dave:
For resolving this mystery for me -- I know I could work with DATEDIF in Excel 97, but I couldn't find in the FUNCTION gallery!
 
Upvote 0
Hi Dave,

I have tried to find that DATEDIF function in Excel 97, but no luck.

I guess my Excel version is not one of your "most versions" then.

Thanks
 
Upvote 0
Hi BabyTiger:
Have you tried using the function in Excel 97 -- as I mentioned in my post, I was familiar that the function existed and I could use the function in Excel 97, but I could not find it in the function gallery, nor could I find help on this function within Excel 97. So, give it a shot and use the function -- you may be pleasantly surprised that it does exist -- it is just not documented!
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,287
Members
448,562
Latest member
Flashbond

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top