convertToDateTime: Convert from excel time number to R POSIXct type.

Description Usage Arguments Details Examples

View source: R/wrappers.R

Description

Convert from excel time number to R POSIXct type.

Usage

1
convertToDateTime(x, origin = "1900-01-01", ...)

Arguments

x

A numeric vector

origin

date. Default value is for Windows Excel 2010

...

Additional parameters passed to as.POSIXct

Details

Excel stores dates as number of days from some origin date

Examples

1
2
3
4
## 2014-07-01, 2014-06-30, 2014-06-29
x <- c(41821.8127314815, 41820.8127314815, NA, 41819, NaN) 
convertToDateTime(x)
convertToDateTime(x, tx = "Australia/Perth")

openxlsx documentation built on May 30, 2017, 5:37 a.m.

Search within the openxlsx package
Search all R packages, documentation and source code