Difference between revisions of "Documentation/How Tos/Calc: EOMONTH function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(Initial content) |
m |
||
Line 3: | Line 3: | ||
== EOMONTH == | == EOMONTH == | ||
Returns the date of the last day of a month. | Returns the date of the last day of a month. | ||
+ | |||
This function is only available if '''Analysis AddIn''' is installed. | This function is only available if '''Analysis AddIn''' is installed. | ||
− | |||
=== Syntax: === | === Syntax: === | ||
Line 11: | Line 11: | ||
: <tt>'''addmonths'''</tt> may be positive (in the future), zero or negative (in the past). | : <tt>'''addmonths'''</tt> may be positive (in the future), zero or negative (in the past). | ||
− | |||
=== Example: === | === Example: === | ||
Line 19: | Line 18: | ||
<tt>'''EOMONTH(A1; 2)'''</tt> | <tt>'''EOMONTH(A1; 2)'''</tt> | ||
: where cell A1 contains the date <tt>'''16Dec07'''</tt>, again returns <tt>'''39507'''</tt>, which may be formatted as <tt>'''29Feb08'''</tt>. | : where cell A1 contains the date <tt>'''16Dec07'''</tt>, again returns <tt>'''39507'''</tt>, which may be formatted as <tt>'''29Feb08'''</tt>. | ||
− | |||
=== See also: === | === See also: === |
Revision as of 14:40, 15 January 2008
EOMONTH
Returns the date of the last day of a month.
This function is only available if Analysis AddIn is installed.
Syntax:
EOMONTH(startdate; addmonths)
- addmonths is a number of months to be added to the startdate (given as text or a date-time serial number), to give a new date. For this new date, EOMONTH returns the date of the last day of the month, as a date-time serial number.
- addmonths may be positive (in the future), zero or negative (in the past).
Example:
EOMONTH("2008/02/14"; 0)
- returns 39507, which may be formatted as 29Feb08. 2008 is a leap year.
EOMONTH(A1; 2)
- where cell A1 contains the date 16Dec07, again returns 39507, which may be formatted as 29Feb08.