File: convertToDateTime.Rd

package info (click to toggle)
r-cran-openxlsx 4.2.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,328 kB
  • sloc: cpp: 1,867; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 762 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers.R
\name{convertToDateTime}
\alias{convertToDateTime}
\title{Convert from excel time number to R POSIXct type.}
\usage{
convertToDateTime(x, origin = "1900-01-01", ...)
}
\arguments{
\item{x}{A numeric vector}

\item{origin}{date. Default value is for Windows Excel 2010}

\item{...}{Additional parameters passed to as.POSIXct}
}
\description{
Convert from excel time number to R POSIXct type.
}
\details{
Excel stores dates as number of days from some origin date
}
\examples{
## 2014-07-01, 2014-06-30, 2014-06-29
x <- c(41821.8127314815, 41820.8127314815, NA, 41819, NaN)
convertToDateTime(x)
convertToDateTime(x, tz = "Australia/Perth")
convertToDateTime(x, tz = "UTC")
}