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

Calculate date difference

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


Joined: 27 May 2008
Posts: 1

PostPosted: Tue May 27, 2008 11:28 am    Post subject: Calculate date difference Reply with quote

I am trying to get the date difference to display the months and days between dates. ie. 11 months 17 days. Is there something I can add to =MONTHS(A13;D4;0)&" Months " to display the remaining days?
Thanks
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed May 28, 2008 5:01 am    Post subject: Reply with quote

Simply substract one date from the other. All dates and times are formatted numbers in unit "Days".
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
davidh182
OOo Advocate
OOo Advocate


Joined: 01 Apr 2004
Posts: 413

PostPosted: Thu May 29, 2008 5:03 am    Post subject: Reply with quote

Not sure this will work -
eg 63 days might be 2 months + 1 days or 2 months+2 days

I think you need to construct the date with the same day number as A13 but less than 1 month from D4 which you can do in a series of cells, or 1 cell like this:
Code:

=DAYS(D4;DATE(YEAR(A13);MONTH(A13)+MONTHS(A1;D4;0);DAY(A13)))


[If month argument goes above 12 it does helpfully wrap around to the next year]
Back to top
View user's profile Send private message Send e-mail
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