OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Date Difference

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
Soefje
Newbie
Newbie


Joined: 27 Apr 2005
Posts: 2

PostPosted: Wed Apr 27, 2005 9:11 pm    Post subject: Date Difference Reply with quote

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
View user's profile Send private message
carl
Super User
Super User


Joined: 21 Apr 2003
Posts: 920
Location: Germany

PostPosted: Wed Apr 27, 2005 11:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Thu Apr 28, 2005 6:09 am    Post subject: Re: Date Difference Reply with quote

[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
View user's profile Send private message
Soefje
Newbie
Newbie


Joined: 27 Apr 2005
Posts: 2

PostPosted: Thu Apr 28, 2005 6:25 am    Post subject: date diff Reply with quote

I am using Excel XP.
_________________
Scott Soefje
San Antonio, TX
Back to top
View user's profile Send private message
Sliderule
Super User
Super User


Joined: 29 May 2004
Posts: 2499
Location: 3rd Rock From The Sun

PostPosted: Thu Apr 28, 2005 7:26 am    Post subject: Reply with quote

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
View user's profile Send private message
french
OOo Enthusiast
OOo Enthusiast


Joined: 29 Nov 2004
Posts: 129
Location: Iowa, USA

PostPosted: Thu Apr 28, 2005 9:20 am    Post subject: Reply with quote

There's a nice explanation of DATEDIF at:

http://www.cpearson.com/excel/datedif.htm
Back to top
View user's profile Send private message
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Thu Apr 28, 2005 10:33 am    Post subject: Reply with quote

french wrote:
There's a nice explanation of DATEDIF at:

http://www.cpearson.com/excel/datedif.htm


I took another look and found it in the help; i must have dozed off?

Thanks.

David.
Back to top
View user's profile Send private message
williamts99
Newbie
Newbie


Joined: 08 Oct 2005
Posts: 3

PostPosted: Mon Feb 06, 2006 1:35 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group