Difference between revisions of "Documentation/How Tos/Calc: DAYS function"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial content)
 
(Issue 84884 resolved; problem with ODFF)
Line 30: Line 30:
  
 
=== Issues: ===
 
=== Issues: ===
* The forthcoming ODFF standard requires reversed parameters - ie <tt>'''DAYS(startdate; enddate)'''</tt>; see [http://qa.openoffice.org/issues/show_bug.cgi?id=84884 Issue 84884].
+
* Note that <tt>'''DAYS'''</tt> does not count the first day of the period, but  <tt>'''NETWORKDAYS'''</tt> does.
 
+
* <tt>'''DAYS'''</tt> does not count the first day of the period, but  <tt>'''NETWORKDAYS'''</tt> does. This complies with the ODFF standard, but is potentially confusing.
+

Revision as of 17:53, 29 December 2007


DAYS

Returns the number of days between two dates


Syntax:

DAYS(enddate; startdate)

startdate and enddate may be dates as numbers or text (which is converted to number form).
DAYS returns enddate - startdate. The result may be negative.


Example:

DAYS("3Mar08"; "1Mar08")

returns 2.

DAYS(A1; A2)

where cell A1 contains the date 9Jun08 and A2 contains 2Jun08 returns 7.


See also:

DAYS360, NETWORKDAYS

Date & Time functions

Date & Time overview


Issues:

  • Note that DAYS does not count the first day of the period, but NETWORKDAYS does.
Personal tools