More about Dates

We are looking into some more Weekday formula in addition to my earlier blog post about Weekday function.

In this example we are identifying  the first and last weekdays using the Weekday, Month, Date & MOD function in Google Docs Speadsheets.

The Chosen date is in cell B1,

the link to my earlier Weekday function

WEEKDAY

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

WEEKDAY(number, type)

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

type: 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(“2-Feb-2012”, 1) returns 5  (Thursday, the fifth day if you start counting Sunday as day 1).
=WEEKDAY(“2-Feb-2012”) returns the same value as the preceding example (numbering scheme 1 is used if no number-scheme argument is specified).

=WEEKDAY(“2-Feb-2012”,2) returns 4 (Thursday, the Fourth day if you start counting Monday as day 1).
=WEEKDAY(”2-Feb-2012”, 3) returns 3 (Thursday, day number 3 if you start counting Monday as day 0).