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

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Automated text replacement %s)
m
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{DISPLAYTITLE: WEEKNUM_ADD function}}
 +
{{Documentation/CalcFunc DateTimeTOC
 +
|ShowPrevNext=block
 +
|PrevPage=Documentation/How_Tos/Calc:_WEEKNUM_function
 +
|NextPage=Documentation/How_Tos/Calc:_MONTHS_function
 +
}}__NOTOC__
  
 
== WEEKNUM_ADD ==
 
== WEEKNUM_ADD ==
Line 14: Line 19:
 
: <tt>'''mode'''</tt> specifies which day is considered the first day of the week: <tt>'''1'''</tt> for Sunday, <tt>'''2'''</tt> for Monday.
 
: <tt>'''mode'''</tt> specifies which day is considered the first day of the week: <tt>'''1'''</tt> for Sunday, <tt>'''2'''</tt> for Monday.
  
: <tt>'''WEEKNUM_ADD'''</tt> mimics the behaviour of the <tt>'''WEEKNUM'''</tt> function in Excel. Calc's <tt>* [[Documentation/How_Tos/Calc: WEEKNUM function|WEEKNUM]]'''</tt> function returns the international standard ISO8601 week number.
+
: <tt>'''WEEKNUM_ADD'''</tt> mimics the behaviour of the <tt>'''WEEKNUM'''</tt> function in Excel. Calc's <tt>[[Documentation/How_Tos/Calc: WEEKNUM function|WEEKNUM]]</tt> function returns the international standard ISO8601 week number.
  
 
=== Example: ===
 
=== Example: ===
Line 20: Line 25:
 
: returns <tt>'''2'''</tt>. 7Jan10 is a Thursday, and 1Jan10 is the Friday of the preceding week.
 
: returns <tt>'''2'''</tt>. 7Jan10 is a Thursday, and 1Jan10 is the Friday of the preceding week.
  
{{Documentation/SeeAlso|
+
=== Issues: ===
* [[Documentation/How_Tos/Calc: WEEKNUM function|WEEKNUM]]'''
+
*<tt>'''WEEKNUM_ADD'''</tt> is called <tt>'''WEEKNUM'''</tt> in the ODFF standard.
  
 +
{{SeeAlso|EN|
 +
* [[Documentation/How_Tos/Calc: WEEKNUM function|WEEKNUM]]
 
* [[Documentation/How_Tos/Calc: YEAR function|YEAR]]
 
* [[Documentation/How_Tos/Calc: YEAR function|YEAR]]
 
* [[Documentation/How_Tos/Calc: MONTH function|MONTH]]
 
* [[Documentation/How_Tos/Calc: MONTH function|MONTH]]
Line 29: Line 36:
 
* [[Documentation/How_Tos/Calc: HOUR function|HOUR]]
 
* [[Documentation/How_Tos/Calc: HOUR function|HOUR]]
 
* [[Documentation/How_Tos/Calc: MINUTE function|MINUTE]]
 
* [[Documentation/How_Tos/Calc: MINUTE function|MINUTE]]
* [[Documentation/How_Tos/Calc: SECOND function|SECOND]]'''
+
* [[Documentation/How_Tos/Calc: SECOND function|SECOND]]
 
+
* [[Documentation/How_Tos/Calc: Date & Time functions#Date and Time overview|Date & Time overview]]
* [[Documentation/How_Tos/Calc: Date & Time functions#Date and Time overview|Date & Time overview]]'''
+
* [[Documentation/How_Tos/Calc: Date & Time functions|Date & Time functions]]
 
+
* [[Documentation/How_Tos/Calc: Date & Time functions|Date & Time functions]]'''
+
 
+
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 
+
[[Category: Documentation/Reference/Calc/Date and Time functions]]
=== Issues: ===
+
*<tt>'''WEEKNUM_ADD'''</tt> is called <tt>'''WEEKNUM'''</tt> in the forthcoming ODFF standard.
+

Latest revision as of 14:06, 30 January 2024



WEEKNUM_ADD

Returns the non-ISO week number of a given date.

This function is only available if the Analysis AddIn is installed.

Syntax:

WEEKNUM_ADD(date; mode)

returns the 'conventional' non-ISO week number, where week 1 is the week that contains January 1st.
date is the date as a date-time serial number or as text.
mode specifies which day is considered the first day of the week: 1 for Sunday, 2 for Monday.
WEEKNUM_ADD mimics the behaviour of the WEEKNUM function in Excel. Calc's WEEKNUM function returns the international standard ISO8601 week number.

Example:

WEEKNUM_ADD("2010-01-07"; 2)

returns 2. 7Jan10 is a Thursday, and 1Jan10 is the Friday of the preceding week.

Issues:

  • WEEKNUM_ADD is called WEEKNUM in the ODFF standard.



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_WEEKNUM_ADD_function&oldid=259708"
Views
Personal tools
Navigation
Tools