Defines functions MONTH

Documented in MONTH

# MONTH Function from Excel
#' Basic MONTH function from excel
#' It acts similiarly to Excel's MONTH function. It extracts the month part from the date.
#' @param date  Enter the date to get the month from.
#' @import base
#' @export
#' @examples
#' MONTH(DATE(2020,12,1))
#' @return In this case the function will give you 12 as it is the month of the date we have specified.Function will always return numeric class.

  as.numeric(format(date, '%m'))

Try the ExcelFunctionsR package in your browser

Any scripts or data that you put into this service are public.

ExcelFunctionsR documentation built on July 1, 2020, 8:35 p.m.