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

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Automated text replacement %s)
m
Line 17: Line 17:
 
<tt>'''WEEKNUM("2010-01-07"; 2)'''</tt>
 
<tt>'''WEEKNUM("2010-01-07"; 2)'''</tt>
 
: returns <tt>'''1'''</tt>. 7Jan10 is a Thursday, and 4Jan10 the Monday of that week.
 
: returns <tt>'''1'''</tt>. 7Jan10 is a Thursday, and 4Jan10 the Monday of that week.
 +
 +
=== Issues: ===
 +
*<tt>'''WEEKNUM'''</tt> is called <tt>'''ISOWEEKNUM'''</tt> in the forthcoming ODFF standard.
  
 
{{Documentation/SeeAlso|
 
{{Documentation/SeeAlso|
Line 35: Line 38:
 
* [[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]]}}
 
=== Issues: ===
 
*<tt>'''WEEKNUM'''</tt> is called <tt>'''ISOWEEKNUM'''</tt> in the forthcoming ODFF standard.
 

Revision as of 08:46, 3 March 2009


WEEKNUM

Returns the ISO week number of a given date.

Syntax:

WEEKNUM(date; mode)

returns the international standard ISO8601 week number, where week 1 is the week that contains January 4th.
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
To mimic the non-ISO behaviour of the Excel WEEKNUM function, use WEEKNUM_ADD.

Example:

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

returns 1. 7Jan10 is a Thursday, and 4Jan10 the Monday of that week.

Issues:

  • WEEKNUM is called ISOWEEKNUM in the forthcoming ODFF standard.

Template:Documentation/SeeAlso

Personal tools