Difference between revisions of "Documentation/How Tos/Calc: WEEKDAY function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(Initial content) |
m |
||
(10 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | __NOTOC__ | + | {{DISPLAYTITLE: WEEKDAY function}} |
+ | {{Documentation/CalcFunc DateTimeTOC | ||
+ | |ShowPrevNext=block | ||
+ | |PrevPage=Documentation/How_Tos/Calc:_DAY_function | ||
+ | |NextPage=Documentation/How_Tos/Calc:_HOUR_function | ||
+ | }}__NOTOC__ | ||
== WEEKDAY == | == WEEKDAY == | ||
Line 6: | Line 11: | ||
=== Syntax: === | === Syntax: === | ||
<tt>'''WEEKDAY(date; type)'''</tt> | <tt>'''WEEKDAY(date; type)'''</tt> | ||
− | : returns the day of the week that date falls on, | + | : returns the day of the week that <tt>'''date'''</tt> falls on, as a number. |
− | : | + | : The number returned depends on <tt>'''type'''</tt>, as follows: |
{| border="1" cellpadding="5" cellspacing="0" style="margin: 1em auto 1em auto" | {| border="1" cellpadding="5" cellspacing="0" style="margin: 1em auto 1em auto" | ||
Line 32: | Line 37: | ||
=== Example: === | === Example: === | ||
− | <tt>'''WEEKDAY("2008 | + | <tt>'''WEEKDAY("2008-06-14"; 1)'''</tt> |
: returns <tt>'''7'''</tt>. 14Jun08 falls on a Saturday. | : returns <tt>'''7'''</tt>. 14Jun08 falls on a Saturday. | ||
− | + | {{SeeAlso|EN| | |
− | + | * [[Documentation/How_Tos/Calc: YEAR function|YEAR]] | |
− | + | * [[Documentation/How_Tos/Calc: MONTH function|MONTH]] | |
− | + | * [[Documentation/How_Tos/Calc: DAY function|DAY]] | |
− | + | * [[Documentation/How_Tos/Calc: HOUR function|HOUR]] | |
− | + | * [[Documentation/How_Tos/Calc: MINUTE function|MINUTE]] | |
− | + | * [[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 & Time functions]] | |
+ | |||
+ | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | ||
+ | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | ||
+ | [[Category: Documentation/Reference/Calc/Date and Time functions]] |
Latest revision as of 13:47, 30 January 2024
- Date & Time Functions
- TODAYNOWYEARMONTHDAYWEEKDAYHOURMINUTESECONDDATEDATEVALUETIMETIMEVALUEEOMONTHEDATEWORKDAYNETWORKDAYSDAYSDAYS360DAYSINMONTHDAYSINYEARWEEKSWEEKSINYEARWEEKNUMWEEKNUM_ADDMONTHSYEARS
WEEKDAY
Returns the day of the week for a given date.
Syntax:
WEEKDAY(date; type)
- returns the day of the week that date falls on, as a number.
- The number returned depends on type, as follows:
day of the week type=1 type=2 type=3 Sunday 1 7 6 Monday 2 1 0 Tuesday 3 2 1 Wednesday 4 3 2 Thursday 5 4 3 Friday 6 5 4 Saturday 7 6 5 - If type is omitted, it is assumed to be 1.
Example:
WEEKDAY("2008-06-14"; 1)
- returns 7. 14Jun08 falls on a Saturday.
See Also
-