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

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial content)
 
m (Example:)
Line 13: Line 13:
  
 
=== Example: ===
 
=== Example: ===
<tt>'''DAYS360("2008/02/29"; "2008/08/31")'''</tt>
+
<tt>'''DAYS360("2008-02-29"; "2008-08-31")'''</tt>
 
: returns <tt>'''180'''</tt>, that is, 6 months of 30 days.
 
: returns <tt>'''180'''</tt>, that is, 6 months of 30 days.
  

Revision as of 08:44, 1 February 2008


DAYS360

Returns the number of days between two dates, using the 360 day year.

Syntax:

DAYS360(enddate; startdate; method)

startdate and enddate are the starting and ending dates (text or date-time serial numbers). If startdate is earlier than enddate, the result will be negative.
method is an optional parameter; if 0 or omitted, the US / National Association of Securities Dealers (NASD) method of calculation is used; if 1 (or <>0) the European method of calcuation is used.
The calculation assumes that all months have 30 days, so a year (12 months) has 360 days.

Example:

DAYS360("2008-02-29"; "2008-08-31")

returns 180, that is, 6 months of 30 days.

See also:

DAYS, NETWORKDAYS

Date & Time functions

Date & Time overview

Personal tools