beautypg.com

Weekday, 59 weekday – Apple iWork '09 User Manual

Page 59

background image

Chapter 3

Date and Time Functions

59

WEEKDAY

The WEEKDAY function returns a number that is the day of the week for a given date.

WEEKDAY(date, first-day)

Â

date: The date the function should use. date is a date/time value. The time portion
is ignored by this function.

Â

first-day:  An optional value that specifies how days are numbered.
Sunday is 1 (1 or omitted): Sunday is the first day (day 1) of the week and Saturday
is day 7.
Monday is 1 (2): Monday is the first day (day 1) of the week and Sunday is day 7.
Monday is 0 (3): Monday is the first day (day 0) of the week and Sunday is day 6.

Examples

=WEEKDAY(”Apr 6, 1988”, 1) returns 4 (Wednesday, the fourth day if you start counting Sunday as day
1).
=WEEKDAY(”Apr 6, 1988”) returns the same value as the preceding example (numbering scheme 1 is
used if no number-scheme argument is specified).
=WEEKDAY(”Apr 6, 1988”, 2) returns 3 (Wednesday, the third day if you start counting Monday as day
1).
=WEEKDAY(”Apr 6, 1988”, 3) returns 2 (Wednesday, day number 2 if you start counting Monday as day
0).

Related Topics
For related functions and additional information, see:

“DAYNAME” on page 48

“MONTHNAME” on page 54

“Listing of Date and Time Functions” on page 42

Value Types” on page 36

The Elements of Formulas” on page 15

“Using the Keyboard and Mouse to Create and Edit Formulas” on page 26

“Pasting from Examples in Help” on page 41