Difference between revisions of "Manuals/calci/WEEKDAY"

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=...")
 
Line 1: Line 1:
<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
=WEEKDAY(SN, Type)=
  
Syntax
+
where,
 +
*<math>SN</math> represents a date for which day has to be displayed,
 +
*<math>Type</math> represents the type of return value.
  
</div></div>
+
WEEKDAY() displays the day of the week corresponding to a date.
----
 
<div id="2SpaceContent" align="left"><div class="ZEditBox" align="justify">
 
  
Examples
+
== Description ==
  
</div></div>
+
WEEKDAY(SN, Type)
----
 
<div id="8SpaceContent" align="left"><div class="ZEditBox" align="justify">'''<font face="Times New Roman">''''''''''''<font size="6"> </font>''' '''''''''</font>'''</div></div>
 
----
 
<div id="11SpaceContent" align="left"><div class="ZEditBox mceEditable" align="justify">
 
  
<font size="5">Description</font>
+
*<math>SN</math> is a date value to be entered either in 'date format' or 'dates returned using formulas'.
 +
*If <math>SN</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></div>
+
{| class="wikitable"
----
+
|-
<div id="5SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
+
! Type !! Description
 
+
|-
<font color="#484848"><font face="Arial, sans-serif"><font size="2">This function  gives the day of the week corresponding to a date. </font></font></font>
+
| 0 or 1 or omitted || Number from 1(Sunday) to 7(Saturday)
 
+
|-
</div></div>
+
| 2 || Number from 1(Monday) to 7(Sunday) 
----
+
|-
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"><font size="6">WEEKDAY</font></div></div>
+
| 3 || Number from 0(Monday) to 6(Sunday)
----
+
|}
<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>
+
*If <math>Type</math> values are invalid, Calci displays #N/A error message.
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">C1R1 = 12/11/2003</font></font></font>
+
== Examples ==
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">I.e.= WEEKDAY(C1R1) is 5</font></font></font>
+
Consider the following example that explains the use of WEEKDAY function:
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">///rly = WEEKDAY(C1R1,2) is 4</font></font></font>
+
<div id="2SpaceContent" class="zcontent" align="left">
  
</div></div>
+
{| id="TABLE3" class="SpreadSheet blue"
----
 
<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=" " | 12/11/2003
 
| class="sshl_f" | 5
 
| class="sshl_f" | 4
 
| class="sshl_f  " |
 
|- class="even"
 
| class="  " | Row2
 
| class="                                                    " |
 
| 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="odd"
 
| Row3
 
| class="  " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row4
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row5
+
| class="sshl_f" |  
| class=" " |
+
| class=" " |  
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row6
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 
|}
 
|}
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
=WEEKDAY(A1): Calculates the day of the week from date mentioned in A1. Displays '''4''' (i.e. Wednesday) as a result.
----
+
=WEEKDAY(A1,2): Calculates the day of the week from date mentioned in A1 and return type '2'. Displays '''3''' (i.e. Wednesday) 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">WEEKDAY</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">sn</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">,n)</font></font></font> '''
+
=WEEKDAY(DATE(2013,10,28),3) : Calculates the day of the week from date mentioned and return type '3'. Displays '''0''' (i.e. Monday) as a result.
 +
 +
== See Also ==
 +
 
 +
*[[Manuals/calci/NETWORKDAYS | NETWORKDAYS]]
 +
*[[Manuals/calci/WORKDAY | WORKDAY]]
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">where sn''' '''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">is a sequential number that represents the date of the day and n is a number that determines the type of return value.</font></font></font>
+
== References ==
  
</div></div>
+
*[http://en.wikipedia.org/wiki/Date_format_by_country Date Formats]
----
+
*[http://en.wikipedia.org/wiki/Calendar_date Date]

Revision as of 15:43, 5 February 2014

WEEKDAY(SN, Type)

where,

  • represents a date for which day has to be displayed,
  • represents the type of return value.

WEEKDAY() displays the day of the week corresponding to a date.

Description

WEEKDAY(SN, Type)

  • 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
0 or 1 or omitted Number from 1(Sunday) to 7(Saturday)
2 Number from 1(Monday) to 7(Sunday)
3 Number from 0(Monday) to 6(Sunday)
  • If values are invalid, Calci displays #N/A error message.

Examples

Consider the following example that explains the use of WEEKDAY function:

10/8/2014
=WEEKDAY(A1): Calculates the day of the week from date mentioned in A1. Displays 4 (i.e. Wednesday) as a result.
=WEEKDAY(A1,2): Calculates the day of the week from date mentioned in A1 and return type '2'. Displays 3 (i.e. Wednesday) as a result.
=WEEKDAY(DATE(2013,10,28),3) : Calculates the day of the week from date mentioned and return type '3'. Displays 0 (i.e. Monday) as a result.

See Also

References