| View previous topic :: View next topic |
| Author |
Message |
Soefje Newbie

Joined: 27 Apr 2005 Posts: 2
|
Posted: Wed Apr 27, 2005 9:11 pm Post subject: Date Difference |
|
|
I am porting an Excel spreadsheet I use for Little League baseball in which I need to calculate the league age of each player.
In Excel I use the DATEDIF function, putting the kids birthdate in one column and the index date in an anchored cell, then have it rounded to the the number of years to calculate the league age.
When I opened this spreadsheet in OpenOffice Calc, I got #VALUE in the cell. I could not find a DATEDIFF function. Is there something like that in Calc?
Thanks, _________________ Scott Soefje
San Antonio, TX |
|
| Back to top |
|
 |
carl Super User


Joined: 21 Apr 2003 Posts: 920 Location: Germany
|
Posted: Wed Apr 27, 2005 11:38 pm Post subject: |
|
|
col C is dates in col B minus dates in col A , formatted as a date. _________________ carl
Using OpenOffice.org 2 on XP sp2 |
|
| Back to top |
|
 |
David Super User


Joined: 24 Oct 2003 Posts: 5668 Location: Canada
|
Posted: Thu Apr 28, 2005 6:09 am Post subject: Re: Date Difference |
|
|
[quote="Soefje"]In Excel I use the DATEDIF function/quote]
I couldn't see that function [either spelling] in Excel version 2000. Which version are you using? A simple difference in dates is found by subtraction and ofrmatting as pointed out by Carl.
David. |
|
| Back to top |
|
 |
Soefje Newbie

Joined: 27 Apr 2005 Posts: 2
|
Posted: Thu Apr 28, 2005 6:25 am Post subject: date diff |
|
|
I am using Excel XP. _________________ Scott Soefje
San Antonio, TX |
|
| Back to top |
|
 |
Sliderule Super User


Joined: 29 May 2004 Posts: 2474 Location: 3rd Rock From The Sun
|
Posted: Thu Apr 28, 2005 7:26 am Post subject: |
|
|
Soefje:
Rather then use the datediff function . . . use . . . years
=YEARS(A2; B2; 0)
In the above example . . . A2 is the 'start date' (or kid's birthday in your example) . . . B2 is the 'end date' (index date in an anchored cell in your example) and the third entry, o is to tell Calc - the type of difference . . . pPossible values are 0 (interval) and 1 (in calendar years).
I hope this helps . . . and . . . please let us / me know.
SlideRule |
|
| Back to top |
|
 |
french OOo Enthusiast

Joined: 29 Nov 2004 Posts: 129 Location: Iowa, USA
|
|
| Back to top |
|
 |
David Super User


Joined: 24 Oct 2003 Posts: 5668 Location: Canada
|
Posted: Thu Apr 28, 2005 10:33 am Post subject: |
|
|
I took another look and found it in the help; i must have dozed off?
Thanks.
David. |
|
| Back to top |
|
 |
williamts99 Newbie


Joined: 08 Oct 2005 Posts: 3
|
Posted: Mon Feb 06, 2006 1:35 am Post subject: |
|
|
| I use =YEARS(A2;TODAY(); 0) to calulate age without having to have an extra reference cell with today's date in it. |
|
| Back to top |
|
 |
|