Skip to contents

Get MonthYear (zoo) from a dataframe string formatted data column

Usage

GetMonthYear(datecol, datefmt = "%Y-%m-%d")

Arguments

datecol

A vector of string formatted dates

datefmt

Format of the date (default is Y-m-d)

Value

A vector with dates converted to MonthYear format (zoo::as.yearmon)