timeConv | R Documentation |
Since data imported from Excel often changes date and time data to numeric,
timeConv
converts dates from decimal numbers to Date with a time zone
of "UTC" unless otherwise specified.
timeConv(x, tz = "UTC", dataSource = "Excel")
x |
A numeric string |
dataSource |
dataSource Either "Excel" (default) or "Unix" depending on where the data are coming from. Excel data have an origin of Dec. 30, 1899 whereas Unix or R data have an origin of Jan. 1, 1970. |
Returns a POSIXct object
timeConv(43252.5)
# "2018-06-01 12:00:00 UTC"
timeConv(18526.2356, dataSource = "R")
# "2020-09-21 05:39:15 UTC"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.