ParseDateTime | R Documentation |
Parses date-time character vectors to POSIXct
ParseDateTime(x, us.format = TRUE, time.zone = "UTC")
AsDateTime(
x,
us.format = NULL,
time.zone = "UTC",
exact = FALSE,
on.parse.failure = "error"
)
x |
A character vector of dates with timestamps, which should all be in the same
format (excluding missing values). Can also be of class |
us.format |
logical; whether to use the US convention for dates; can be |
time.zone |
An optional time zone (default |
exact |
see |
on.parse.failure |
Character string specifying how parse failures should be handled;
|
ParseDateTime
is deprecated and merely calls AsDateTime
A vector of POSIXct date-time objects, if all elements of x
have
the same, valid format; otherwise, when on.parse.failure
is not
"error"
, a vector of NA values with the same length as x
.
See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for a list of time zones.
parse_date_time2
, DateTimeClasses
AsDateTime("1-2-2017 12:34:56", us.format = FALSE)
AsDateTime(c("2018-06-19T16:45:30.045Z", "2018-06-20T06:12:34.125+06"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.