Difference between revisions of "Manuals/calci/WEEKNUM"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify"> Syntax </div></div> ---- <div id="2SpaceContent" align="left"><div class="ZEditBox" align=...")
 
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
<div style="font-size:30px">'''WEEKNUM (Value,Type)'''</div><br/>
 +
where,
 +
*<math>Value</math> represents a date for which week number has to be displayed.
 +
*<math>Type</math> represents the type of return value.
 +
**WEEKNUM() converts a serial number to a number representing where the week falls numerically with a year.
  
Syntax
 
  
</div></div>
+
== Description ==
----
 
<div id="2SpaceContent" align="left"><div class="ZEditBox" align="justify">
 
  
Examples
+
WEEKNUM(Value, Type)
  
</div></div>
+
*<math>Value</math> and <math>Type</math> are required arguments.
----
+
*<math>Value</math> is a date value to be entered either in 'date format' or 'dates returned using formulas'.
<div id="8SpaceContent" align="left"><div class="ZEditBox" align="justify">'''<font face="Times New Roman">''''''''''''<font size="6"> </font>''' '''''''''</font>'''</div></div>
+
*If <math>Value</math> values are invalid, Calci displays #N/A error message.
----
+
*<math>Type</math> is the type of return value. It can be from the following -
<div id="11SpaceContent" align="left"><div class="ZEditBox mceEditable" align="justify">
 
  
<font size="5">Description</font>
+
{| class="wikitable"
 +
|-
 +
! Type !! Description
 +
|-
 +
| 1 || Number from 1(Sunday) to 7(Saturday)
 +
|-
 +
| 2 || Number from 1(Monday) to 7(Sunday) 
 +
|}
  
</div></div>
+
*If <math>Type</math> values are invalid, Calci displays #N/A error message.
----
+
*We can use Range values also. For Example: WEEKNUM(#10/28/2013-12/28/2013,1)
<div id="5SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
+
* #date notation needs  mm/dd/yy format .
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">This function gives a number that indicates where the week falls numerically within a year.</font></font></font>
+
== Examples ==
  
</div></div>
+
Consider the following example that shows the use of WEEKNUM function:
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"><font size="6">WEEKNUM</font></div></div>
 
----
 
<div id="9SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
 
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Let's see an example in Column1Row1</font></font></font>
+
<div id="2SpaceContent" class="zcontent" align="left">
  
[javascript:ToggleDiv('divExpCollAsst_4') <font face="Arial, sans-serif"><font size="2" color="#0000ff">C1R1 = February 14,2007</font></font>]
+
{| id="TABLE3" class="SpreadSheet blue"
 
 
[javascript:ToggleDiv('divExpCollAsst_4') <font face="Arial, sans-serif"><font size="2" color="#0000ff">I.e.=WEEKNUM(C1R1,1) is 7</font></font>]
 
 
 
<br /><br />
 
 
 
</div></div>
 
----
 
<div id="12SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE1" class="SpreadSheet blue"
 
 
|- class="even"
 
|- class="even"
 +
| class=" " | 10/8/2014
 +
| class=" " |
 
| class=" " |
 
| class=" " |
| Column1
+
 
| Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class=" " | February 14,2007
 
| class="sshl_f" | 7
 
| class="          sshl_f  " |
 
| class=" " |
 
|- class="even"
 
| class="  " | Row2
 
| class="                                                                              " |
 
| class="f52543                                                                          " |
 
| class="  SelectTD" |
 
<div id="12Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="12Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| class=" " |
 
|- class="odd"
 
| Row3
 
| class="  " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row4
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row5
+
| class="sshl_f" | 2/10/2013
| class=" " |
+
| class=" " |  
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row6
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 
|}
 
|}
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
=WEEKNUM(A1,1): Calculates the number of the week in the year for date mentioned in A1 and return type '1'. <br />Displays '''41''' as a result.
----
+
=WEEKNUM(B1,2): Calculates the number of the week in the year for date mentioned in A1 and return type '2'. <br />Displays '''6''' as a result.
<div id="6SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">'''WEEKNUM'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">(</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">'''d,n'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">)</font></font></font>
+
=WEEKNUM(DATE(2013,10,28),1) : Calculates the number of the week in the year for date mentioned and <br />return type '1'. Displays '''44''' as a result.
 +
 +
==Related Videos==
 +
 
 +
{{#ev:youtube|-IhVqQv9p84|280|center|WEEKNUM}}
 +
 
 +
== See Also ==
 +
 
 +
*[[Manuals/calci/WEEKDAY | WEEKDAY]]
 +
*[[Manuals/calci/WORKDAY | WORKDAY]]
 +
 
 +
== References ==
 +
 
 +
*[http://en.wikipedia.org/wiki/Date_format_by_country Date Formats]
 +
*[http://en.wikipedia.org/wiki/Calendar_date Date]
 +
*[http://en.wikipedia.org/wiki/Week Week]
 +
 
 +
 
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">where d''' '''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">is a date within the week and n is a number that determines on which day the week begins. </font></font></font>
+
*[[Z_API_Functions | List of Main Z Functions]]
  
</div></div>
+
*[[ Z3 |  Z3 home ]]
----
 

Latest revision as of 05:37, 19 February 2020

WEEKNUM (Value,Type)


where,

  • represents a date for which week number has to be displayed.
  • represents the type of return value.
    • WEEKNUM() converts a serial number to a number representing where the week falls numerically with a year.


Description

WEEKNUM(Value, Type)

  • and are required arguments.
  • is a date value to be entered either in 'date format' or 'dates returned using formulas'.
  • If values are invalid, Calci displays #N/A error message.
  • is the type of return value. It can be from the following -
Type Description
1 Number from 1(Sunday) to 7(Saturday)
2 Number from 1(Monday) to 7(Sunday)
  • If values are invalid, Calci displays #N/A error message.
  • We can use Range values also. For Example: WEEKNUM(#10/28/2013-12/28/2013,1)
  • #date notation needs mm/dd/yy format .

Examples

Consider the following example that shows the use of WEEKNUM function:

10/8/2014
2/10/2013
=WEEKNUM(A1,1): Calculates the number of the week in the year for date mentioned in A1 and return type '1'. 
Displays 41 as a result. =WEEKNUM(B1,2): Calculates the number of the week in the year for date mentioned in A1 and return type '2'.
Displays 6 as a result. =WEEKNUM(DATE(2013,10,28),1) : Calculates the number of the week in the year for date mentioned and
return type '1'. Displays 44 as a result.

Related Videos

WEEKNUM

See Also

References