WEEKDAY {ExcelFunctionsR}R Documentation

Basic WEEKDAY function from excel

Description

It acts similiarly to Excel's WEEKDAY function. It tells you the weekday of the date's day either in number format or character format.

Usage

WEEKDAY(date, return = "number")

Arguments

date

What date should it take to get the weekday from. For example: "23-06-2020"

return

Should it return number or should it return the day in the characters format. Specify in quotes number if you want it to return number, specify character if you want to get the character, like Monday

Value

In the first case we get the number formatted 1st February of 2020 which is 6. We plug in the same date in the 2nd example and we specify the return argument "character", therefore it gives us the "Saturday" in character format. Function returns either character or numeric class.

Examples

WEEKDAY(DATE(2020,2,1),return = "number")
WEEKDAY(DATE(2020,2,1),return = "character")

[Package ExcelFunctionsR version 0.1.4 Index]