# NOT RUN {
starttime <- parseDatetime(2015080718, timezone = "America/Los_Angeles")
datetimes <- parseDatetime(
c("20181014 12", "20181015 12", "20181016 12"),
timezone = "America/New_York"
)
# }
# NOT RUN {
badInput <- c("20181013", NA, "20181015", "181016", "10172018")
# This will return a vector with the date that were able to parse
parseDatetime(badInput, timezone = "UTC", expectAll = FALSE)
# This will return an error, since some non-NA indices didn't parse
parseDatetime(badInput, timezone = "UTC", expectAll = TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab