Difference between revisions of "Documentation/How Tos/Calc: DAYS function"
From Apache OpenOffice Wiki
< Documentation | How Tos
Javier Lopez (Talk | contribs) |
Javier Lopez (Talk | contribs) |
||
Line 4: | Line 4: | ||
|ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Date_%26_Time_functions|<div style="font-size: 140%;">Date & Time Functions]] | |ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Date_%26_Time_functions|<div style="font-size: 140%;">Date & Time Functions]] | ||
|ShowNextPage=block|NextPage=Documentation/How_Tos/Calc:_DAYS360_function | |ShowNextPage=block|NextPage=Documentation/How_Tos/Calc:_DAYS360_function | ||
− | |ShowPrevPage=block|PrevPage=Documentation/How_Tos/Calc: | + | |ShowPrevPage=block|PrevPage=Documentation/How_Tos/Calc:_NETWORKDAYS_function |
|ShowPrevPart=block|PrevPart=Documentation/How_Tos/Calc:_Database_functions | |ShowPrevPart=block|PrevPart=Documentation/How_Tos/Calc:_Database_functions | ||
|ShowNextPart=block|NextPart=Documentation/How_Tos/Calc:_Financial_functions | |ShowNextPart=block|NextPart=Documentation/How_Tos/Calc:_Financial_functions |
Revision as of 17:44, 12 May 2013
CALC FUNCTIONS
- Date & Time Functions
- TodayNowYearMonthDayWeekdayHourMinuteSecondDateDatevalueTimeTimevalueEomonthEdateWorkdayNetworkdaysDaysDays360DaysinmonthDaysinyearWeeksWeeksinyearWeeknumWeeknum_addMonthsYears
Contents
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("2008-03-03"; "2008-03-01")
- returns 2, the number of days between 1March08 and 3March08.
DAYS(A1; A2)
- where cell A1 contains the date 2008-06-09 and A2 contains 2008-06-02 returns 7.
Issues:
- Note that DAYS does not count the first day of the period, but NETWORKDAYS does.
- DAYS is not portable to Excel.
- DAYS really does return enddate - startdate; thus if either date has a time component (for example "2008-01-03T15:15"), the number of days returned may not be integer. To ensure an integer result, consider INT(DAYS()).
-