xlDate: Convert dates from Excel

Description Usage Arguments Value Examples

View source: R/ShortFunctions.R

Description

Convert date values pulled from an Excel workbook, such as .xslx. This function just runs as.Date with the origin set to "1899-12-30". Excel apparently uses this as the origin because they did not realize that 1900 was not a leap year.

Usage

1
xlDate(x)

Arguments

x

a numeric vector

Value

A vector containing the elements of x converted to Date format

Examples

1
2
3
4
5
xlDate(42359)
xlDate(0)
xlDate(-1365)
datevector = 40000 + (1:10)*365
xlDate(datevector)

debarros/dbTools documentation built on Dec. 7, 2018, 2:10 p.m.