dtt_excel_to_date: Convert Excel dates to dates.

View source: R/excel_to_date.R

dtt_excel_to_dateR Documentation

Convert Excel dates to dates.

Description

Converts Excel dates encoded as serial numbers to date class.

Usage

dtt_excel_to_date(x, modern = TRUE, ...)

Arguments

x

A vector of numbers to convert.

modern

A flag specifying whether to use the modern or old Excel date system.

...

Unused.

Details

Defaults to the modern Excel date encoding system. Excel for Mac 2008 and earlier Mac versions of Excel use a different date system. If the date 2016-01-01 is represented by 42370, it's the modern system. If it's 40908, it's the old system.

Value

A floored Date vector.

See Also

Other floor: dtt_date(), dtt_date_time(), dtt_floor(), dtt_floored(), dtt_set_time()

Examples

dtt_excel_to_date(42370)
dtt_excel_to_date(40908, modern = FALSE)

dttr2 documentation built on Sept. 26, 2024, 1:06 a.m.