Thanks:  0
Likes:  0

Thread: date conversion

1. This is probably very basic, but:

I need to do the following:

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

thanks

2. 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 ]

3. 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 ]

4. 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!

5. 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

6. 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!

User Tag List

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•