xlsx_date: number to date for vector/column from excel sheet with mixed...

View source: R/xlsx_date.R

xlsx_dateR Documentation

number to date for vector/column from excel sheet with mixed value types

Description

readxl::read_excel() on a column with mixed formated cells will not easily parse dates consider read_excel(..., col_types = c("date","guess",...)) unless column is mixed valued (e.g. "42068", "1/31/2010,1/2/2011", ...) NB. excel's date origin is 1899-12-30

Usage

xlsx_date(x, msg = NULL, minyear = 2000, maxyear = year_() + 2)

Arguments

x

(vector of) would be dates to transform back

Examples

print(xlsx_date(c(41977,"42068"))) # "2014-12-04" "2015-03-05"
xlsx_date("10977") # error out of range (1933-01-14)

LabNeuroCogDevel/LNCDR documentation built on Oct. 13, 2023, 4:31 a.m.